2
$\begingroup$

Let's say I have to perform more than one non-linear fit over experimental replicates, each of them being an exponential decay (y <- 50*exp(-Ax)). What I'm doing right now is to use the R function nls for each decay, to obtain the estimated parameter A together with associated standard error of the fit.

What I would like to get is a single estimate (and not one for each decay) with associated error that takes into account both the inter-sample variability and the error associated with each fit.

One approach I tried is to take the average of the estimates as the best fitted parameter, and their standard deviation as the resulting error. However, with this approach I am not taking into account that each fitted parameter comes with a standard error due to the fitting procedure.

Is there a way to tackle this issue?

Thanks in advance

$\endgroup$
2
  • $\begingroup$ So you just want to average the estimated A parameters from a number of fits, but you want to take the SEs into account, is that right? $\endgroup$ Commented Mar 22, 2016 at 13:25
  • $\begingroup$ Yes, it is right $\endgroup$
    – Ruggero
    Commented Mar 22, 2016 at 13:47

1 Answer 1

2
$\begingroup$

I can think of a few different approaches.

  1. Stack all of the experiments up and treat them all as one dataset. You will get one estimate and one standard error. This will likely underestimate your standard error.

  2. Stack all of the experiments up, but use a mixed effects model to account for the different experiments. You would probably want to take a log to make the estimation feasible. The model you fit would look like: $$\log(y_{ij}) - \log(50) = -(A + \eta_i) x_{ij} + \epsilon_{ij},$$ where $y_{ij}$ is the $j$th observation in experiment $i$. The random slope of $\eta_i$ will account for the correlation that may be present among observations from the same experiment.

  3. Borrow some ideas from multiple imputation and treat each experiment as a different imputed data set. For each experiment, you will get an estimated $\hat{A}_i$ and standard error $\sqrt{W_i} = \sqrt{var(\hat{A}_i)}$. The overall estimate of $A$ will be that average of $\hat{A}_i$ ($\bar{A}$). From the law of total variance, an estimate of the squared standard error may be: $$\frac{1}{m} \sum_i W_i + \frac{1}{m-1}\sum_i (\hat{A}_i - \bar{A})^2,$$ wherer $m$ is the number of experiments.

$\endgroup$
1
  • $\begingroup$ They could use a non-linear mixed effects model (R package nlme). No need to take the log. $\endgroup$
    – Roland
    Commented Mar 22, 2016 at 14:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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