[R] How to test significant differences for non-linearrelationships for two locations

Jenny Sun jenny.sun.sun at gmail.com
Tue May 27 08:10:35 CEST 2008


Thanks for the reply!

I thought of dummy variable. But I have no idea how to put the dummy into the model. 

Say I have a Y~ X relationship in logistic form as:

nls(Y~a/(1+b*exp(-c*X),start=c(a=1,b=1,c=1) assume I am using nls to solve the question. 

where could I put the dummy variable?  Thanks!

Jenny

>  is it possible for you to include the site  as a dummy 0-1 and then 
>use just one logistic model rather than two ? this way, the test of 
>whether site
>matters would be easier to do using say a likelihood ratio test of the 
>full model versus sub model. then, if the site dummy is significant, 
>that
>means the relationships for the two sites are significantly different.
>
>
>
>
>On Tue, May 27, 2008 at  2:23 AM, Jenny Sun wrote:
>
>> Hi List,
>>
>> I have to compare a relationship between y and x for two locations. I 
>> found logistic regression fits both datasets well, but I am not sure 
>> how to test if relationships for both sites are significantly 
>> different. I searched the r site, however no answers exactly match the 
>> question.
>>
>> I used Tukey's HSD to compare two means, but the relationship in my 
>> study was not simply linear. So I was wondering if there is anyone had 
>> experience in making such comparisons. Thanks in advance!
>>
>> Jenny
>>
>> 	[[alternative HTML version deleted]]
>>
>> ______________________________________________
>> 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.



More information about the R-help mailing list