Re: [R] AIC using nls function

2010-08-28 Thread Ben Bolker
Bert Gunter gunter.berton at gene.com writes: John: 1. As always, and as requested (see posting guide), a small reproducible example might help. Bert is right that things aren't well defined. However, AIC is still *widely* used for nonlinear models. For the sloppy folks among us, here

[R] AIC using nls function

2010-08-27 Thread John Ludlam
Using the nls function I fit the following model (and some others) to my data. mod1=nls(CLr ~ A-(A-CLi)*exp(-k*d), start = list(A=60,k=0.005)) I would like to rank a set of models using AIC. I calculated AIC as AIC(mod1) However, it appears to use an incorrect number of parameters (3 instead of

Re: [R] AIC using nls function

2010-08-27 Thread Bert Gunter
John: 1. As always, and as requested (see posting guide), a small reproducible example might help. 2. What is CLi in your model? 3. In general, AIC may not be particularly meaningful as a measure of fit quality penalized for model complexity in NON-linear models unless the different models are