Dear R users, In my data, there are two variables t1 and t2. For each observation of t1 and t2, two location indicators (x, y) were provided.
The data format is # x y t1 t2 Since the both t1 and t2 are depended on x and y, t1 and t2 are autocorrelated variables. My question is how to calculate the correlation between t1 and t2 by taking into account the structure of residual variance caused by x and y. Seemly, the gls function in nlme/R package might can be used for the purpose. However, I failed to figure out how to use the function for my data. I appreciate your kind help providing an example code for the above data format. Please also let me know if there is any other more suitable R package for the analysis. Best regards, Zhiqiu [[alternative HTML version deleted]] ______________________________________________ R-help@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.