1
$\begingroup$

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?
$\endgroup$
4
  • $\begingroup$ 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. $\endgroup$ May 8 '15 at 13:06
  • $\begingroup$ Thank you gung also for the formating, I knew about the formatting, but somehow forgot in the moment. $\endgroup$ May 8 '15 at 13:20
  • $\begingroup$ If you already have v(g) how are you going to maximize the correlation? The correlation would be constant $\endgroup$
    – Aksakal
    May 8 '15 at 13:53
  • $\begingroup$ Changed the description due to the possibility of misunderstanding. $\endgroup$ May 8 '15 at 14:07
1
$\begingroup$

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]$

Since you did not specify the error structure (multiplicative, additive etc.), it's impossible to say which one is the best for you.

$\endgroup$
1
  • $\begingroup$ 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)$. $\endgroup$ May 8 '15 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.