Re: [R] How to test significant differences for non-linear relationships for two locations

From: <ctu_at_bigred.unl.edu>
Date: Tue, 27 May 2008 04:07:53 -0500

Hi Jenny,

My suggestion is that
1. require(nlme)
2. combine two data sets and create a new variable e.g., location thus your new data set will look like this as following, such as,

y x location
10 0 L1
11 1 L1
12 2 L1

10.1 0   L2
11.2 1   L2
12.1 2   L3

3. Group your data set, LAST<-groupedData(y~x|location, data=new) 4. test<-nlme(y~logistic.function, data=LAST, fixed=alpha+tau+psi~location,

               random=pdDiag(alpha+tau+psi~1),
               start=c(alpha.value,0, tau.value,0,psi.valu,0))
5.anova(test) (<-your answer)
You could find this in Pinheiro and Bates books

Chunhao Tu

Quoting Jenny Sun <jenny.sun.sun_at_gmail.com>:

> 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.
>



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. Received on Tue 27 May 2008 - 09:14:48 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 02 Jul 2008 - 21:32:12 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive