Nathalie Yauschew-Raguenes
2010-Feb-03 15:59 UTC
[R] comparison of parameters for nonlinear regression
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? Thanks in advance -- Nathalie YAUSCHEW-RAGUENES Ph.D Student Unit? de Recherches Ecologie Fonctionnelle et Physique de l'Environnement (EPHYSE) INRA, Centre de Bordeaux - Aquitaine 71 Av Edouard Bourlaux 33883 Villenave d'Ornon Cedex France T?l : +33 (0)5 57 12 24 31 Fax : +33 (0)5 57 12 24 20 e-mail : nathalie.yauschew-Raguenes at bordeaux.inra.fr
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 >