[R] NLS and fitting of x-values?

Larsen, Thomas thl at dmu.dk
Mon Jun 26 13:52:54 CEST 2006


I collected eggs laid by Springtails everyday over 28 days after swich to isotopically enriched diet. The eggs were pooled at day 7, 14, and 28 (+ day 0 = initial value) and analyzed for isotopes. After the diet switch the isotopic values of the adults and eggs change towards those of the new diet.
Here are the d13C values (y) of the eggs:

x      y 
0   -22.2
0   -22.2
0   -22.2
0   -22.0
7   486.9
7   498.6
7   489.6
14  820.9
14  817.4
28  895.6
28  900.7
28  890.6
28  885.8

The y values represent the mean of the sampling period.

The dataset is very small but previous experiments have shown that a exponential asymptotic model can be used for this kind of situations. 

How do I fit a model to these pooled values? The y values can be regarded as the mean of the given sampling period.

My first guess is that the x values should be in the middle of the collection period. I call these x-values xi:
xi=c(rep(0,4),rep(3.5,3),rep(10.5,2),rep(21,4))

If I fit them to a nonlinear regression model via least squares (NLS) I get the parameters:
       Value Std. Error  t value 
a 900.386000  3.7839900 237.9460
b 916.630000 29.3987000  31.1792
c   0.230811  0.0102677  22.4792

How do I procede from here? I should probably use a maximum likelihood estimate to estimate the fitted xi? 
Any help would be greatly appreciated.

-------------------------------------------
Thomas Larsen, PhD student
Department of Terrestrial Ecology
National Environmental Research Institute
Vejlsøvej 25, P.O. Box 314, DK-8600 Silkeborg
Phone +45 8920 1572; Fax +45 8920 1414;



More information about the R-help mailing list