
> /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?
>> /
/Dennis Murphy a écrit :/
> /Can you combine the two data sets with a factor representing the
> two conditions, and then incorporate the factor as a term in your
> nonlinear model? You may have to be careful about how the
> factor is introduced into your model, but if you can do it, the test
> on the factor effect would give you an omnibus test of significance
> re the conditions. You could then investigate residuals, perform
> various types of graphics (including on predicted values), etc.
> using the factor term...
>
> HTH,
> Dennis/ 
/Peter Ehlers a écrit :/
> /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 for your advice. But I think I didn't explain clearly my goal. 
The thing is that my models are not nested (at first glance).
To be more precise, I have:
DATA SET 1 with  the model       y ~ Asym_inf1  + Asym_sup1 * ( (1 / (1 
+  (exp( (tmid11-x) / scal11) ) ) )  - (1 / (1 + (exp( (tmid21-x) / 
scal21) ) ) )
DATA SET 2 with  the model       y ~ Asym_inf2  + Asym_sup2 * ( (1 / (1 
+  (exp( (tmid12-x) / scal12) ) ) )  - (1 / (1 + (exp( (tmid22-x) / 
scal2) ) ) ) )

What I really want to test is if ONE parameter is different for each 
distribution or is the same, for example : Is tmid11 = tmid12 (all the 
other parameters considered different for each data set)?

Considering your answers, I guess that I have to merge the data into a 
single  data frame with an indicator  variable for "condition". 
The first model would be the global fit of the new data frame (both data 
sets) :
yglobal ~ Asym_inf  + Asym_sup * ( (1 / (1 +  (exp( (tmid1-x) / scal1) ) 
) )  - (1 / (1 + (exp( (tmid2-x) / scal2) ) ) )

The second model should be, then, the fit of each separate data sets 
with the same value for the parameter that I want to test (tmid1 for 
example).
yglobal ~ (Asym_inf1*c1+Asym_inf2*c2)  + (Asym_sup1*c1+Asym_sup2*c2 ) * 
( (1 / (1 +  (exp( (tmid1-x) / (scal11*c1+scal12*c2)) ) ) )  - (1 / (1 + 
(exp( (tmid21*c1+tmid22*c2)-x) / (scal21*c1+scal22*c2)) ) ) )
where c1 = 1;c2 = 0 for the first data set and c1=0;c2=1 for the second 
data set

Considering this two models, I would be in the case of nested models (I 
think) and so follow your answer by comparing them with anova() (which 
give me the F-test).
It's nice.
But I stil have one question which is how can I write my second model in 
R??? I guess I still have to use nls() but the problem is how can I  say 
when c1=0 or 1 (same for c2)

Thank you for your quick answer ^^

-- 
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@bordeaux.inra.fr


	[[alternative HTML version deleted]]

