[R] nlsList - Error in !unlist(lapply(coefs, is.null))

From: Marc Belisle <marc.m.belisle_at_usherbrooke.ca>
Date: Tue, 19 Feb 2008 10:17:20 -0500


Howdee,

I am able to fit a 4-parameter logistic growth curve to a dataset which comprise many individuals (using R v. 2.3.1). Yet, if I want to obtain the parameters for each individual (i.e., for each 'id') using nlsList, then I obtain an Error message which I have trouble interpreting. Any advice as to how I can solve this problem?

Thanks for your time,

Marc

> reg <-nls(mass ~ SSfpl(age, A, B, xmid, scal),
+ na.action=na.omit,
+ data=data)
> summary(reg)

Formula: mass ~ SSfpl(age, A, B, xmid, scal)

Parameters:

     Estimate Std. Error t value Pr(>|t|)
A     1.42895    0.24472   5.839 5.43e-09 ***
B    21.71508    0.06551 331.495  < 2e-16 ***
xmid 5.93563 0.05773 102.821 < 2e-16 *** scal 1.92278 0.04334 44.369 < 2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 2.715 on 9039 degrees of freedom


> coef(reg)
A B xmid scal 1.428954 21.715081 5.935634 1.922779
> reg <-nlsList(mass ~ SSfpl(age, A, B, xmid, scal)|id,
+ na.action=na.omit, + data=data)
> reg
Call: Model: mass ~ SSfpl(age, A, B, xmid, scal) | id Data: data Coefficients: Error in !unlist(lapply(coefs, is.null)) : incorrect type of argument =================== Marc Bélisle Professeur adjoint Chaire de recherche du Canada en écologie spatiale et en écologie du paysage Département de biologie Université de Sherbrooke 2500 Boul. de l'Université Sherbrooke, Québec J1K 2R1 Canada Tél: +1-819-821-8000 poste 61313 Fax: +1-819-821-8049 Courriél: Marc.M.Belisle_at_USherbrooke.ca ______________________________________________ R-help_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Received on Tue 19 Feb 2008 - 15:22:58 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Feb 2008 - 15:30:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive