In addition to the other comments, you may find it helpful to 
look at "using function derivative information" in the nonlinear 
regression section of Venables and Ripley.
David

[EMAIL PROTECTED] wrote on 10/29/2008 07:56:01 AM:

> Dear R-ecology subscribers,
> 
> 
> 
> Here is a small contamination data set: ‘chlord’ extracted from 
> a publication (Bahner and Oglesby USEPA):
> 
>    V1       V2
> 
> 1   0 0.000000
> 
> 2   7 1.579784
> 
> 3   9 1.857332
> 
> 4  14 1.944483
> 
> 5  21 2.079181
> 
> 6  28 1.939519
> 
> 7  30 2.000000
> 
> 8  35 2.000000
> 
> 9  42 1.924279
> 
> 10 49 1.740363
> 
> 11 56 1.361728
> 
> 
> 
> I would like to translate this old SAS script (provided), to actual R 
code :
> 
> PROC SORT; BY SPECIES CONC TISSUE;
> 
> PROC NLIN BEST = 0.5 ITER = 200 METHOD = MARQUARDT; BY 
> 
> SPECIES CONC TISSUE;
> 
> PARMS         A = 0.1 TO 0.3 by 0.1
> 
>                         C = 0.1 TO 0.7 by 0.2
> 
>                         D = ─0.1 TO 0.3 by 0.2;
> 
> Q = (A + 10**(─C*DAY))); E = 28;
> 
> R = (A + 10**EXP(─D*(DAY─E)));
> 
> MODEL Y = Q**(─1) ─ R**(─1);
> 
> DER.A = ─ (Q** (─2)) + R** (─1);
> 
> DER.C = (Q** (─2))* (10** (─C*DAY))*DAY*LOG(10);
> 
> DER.D = ─10* (DAY ─ E)*EXP (─D*(DAY ─ 
> E))*R**(─2);
> 
> _____WEIGHT____ = DAY;
> 
> 
> 
> I tried the nls function:
> 
> fm<-nls(V2~(A+(10^(-C*V1)))^-1-(A+10^exp(-D*(V1-28)))^-1, 
> data=chlord, trace=TRUE, start=c(A=0.1,C=0.1,D=-0.1), nls.control 
> (maxiter = 200))
> 
> with an extensive research through web, but found no information 
> about how to take into account the DER.A, DER.C and DER.D in R code,
> for optimization. 
> 
> 
> 
> thank you in advance for any information
> 
> Dominique
> 
> 
> 
> ______________________________
> 
> D. Monti
> 
> Marine Lab. 
> 
> University of Antilles and Guyane
> 
> Little Island of Guadeloupe, FWI
> 
> 
> 
> 
> 
>    [[alternative HTML version deleted]]
> 
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

Reply via email to