# Non-linear model fitting

I would like to fit a non-linear model that looks like the following: $V(g)=a*A(g)/(b*B(g)+c*C(g))$, where $g$ represents a gene, $a$, $b$ and $c$ are coefficients of $A(g)$, $B(g)$, $C(g)$, which are simple functions of $g$ that don't need to be optimized.

As I have many genes ($>1000$), my goal is to set up the coefficients $a$, $b$, and $c$, such that correlation between $V(g)$ and another given value $DE(g)$ is maximized.

I can do simple iteration for this; e.g.

for i in range(a):
for j in range(b):
calculate V(g) for all genes with a=i and b=j
calculate spearman correlation between all V(g) and all DE(g).
take i,j pair that make the maximum spearman correlation value.

1. But are there R packages that people usually use for this purpose?
2. Since number of parameters are already set, I don't think I need to do cross-validation, do I?
• Note that asking for R packages is off-topic here. You may or may not get suggestions with any answers you get. The rest is on-topic. May 8 '15 at 13:06
• Thank you gung also for the formating, I knew about the formatting, but somehow forgot in the moment. May 8 '15 at 13:20
• If you already have v(g) how are you going to maximize the correlation? The correlation would be constant May 8 '15 at 13:53
• Changed the description due to the possibility of misunderstanding. May 8 '15 at 14:07

First of all, you will not be able to estimate $a$ and $b$ no matter what you do. It's impossible mathematically from this equation. All you can do is to estimate the ratio $\frac{a}{b}$. If you really need them separate then you have to come up with different experiment, measurement or equation.
Second, you have three choices in estimating the ratio $a/b$
• $a/b=\frac{E[V(g)]E[B(g)]}{A(g)}$
• $a/b=\frac{E[V(g)]}{E[A(g)/B(g)]}$
• $a/b=E\left[\frac{V(g)B(g)}{A(g)}\right]$
• The function is simplified for example. Due to the possibility of misunderstanding, it is now changed. But defining the error structure is the question, actually, because I can't even calculate error value for each gene, since my goal is to maximize the overall correlation between $V(g)$ and $DE(g)$. May 8 '15 at 13:46