[R] comparison of parameters for nonlinear regression
Peter Ehlers
ehlers at ucalgary.ca
Thu Feb 4 12:24:20 CET 2010
Nathalie Yauschew-Raguenes wrote:
> Hi,
>
> I have two series of data set (it's measurment of growth but under two
> different conditions).
> To model these data I use the same function which is :
>
> formula <- y ~ Asym_inf + Asym_sup * ( (1 / (1 + (n1 * (exp( (tmid1-x)
> / scal1) )^(1/n1) ) ) ) - (1 / (1 + (n2 * (exp( (tmid2-x) / scal2)
> )^(1/n2) ) ) ) )
>
> After the estimation of the parameters thanks to "nls", I have 2 models.
> The idea is I want to compare this 2 models and particularly I want to
> know if the parameters are different are not beteween this 2 models. Is
> there a way to do it simply in R?
>
This depends on how much data you have and what assumptions you're
willing to make. I would probably combine the data into a single
data frame with an indicator variable for "condition". Then I would
assume equal error structure for both conditions and formulate two
nested models and thereafter use anova(model.1,model.2) to compare
the models.
But don't get too hung up on the P-value; the extra-sum-of-squares
F-test is approximate.
Have a look at the examples in ?Leaves in the Doug Bates' NRAIA
package or, even better, check out the book by Bates and Watts.
As always, the most important questions are 1) why do you want
to compare models and 2) what will you do with the result of
the comparison.
-Peter Ehlers
> Thanks in advance
>
More information about the R-help
mailing list