[R] nested time series data with measurement error

From: Toby Gass <tobygass_at_warnercnr.colostate.edu>
Date: Wed, 23 Apr 2008 10:09:15 -0600


Dear R helpers,

I am trying to fit a model with the main objective of assessing differences, rather than predicting. The treatment was applied to half of the subjects after 9 months of measurement.
Then 9 more months of data were collected. The variable "month" has measurement error
due to the complexities of data collection. The dependent variable is numeric and continuous. This would be a simple difference between means were it not for the repeated
measurements and measurement error.

I am wondering what the R gurus suggest as to which R function might best model
these data. I have been looking at tsls (two-stage least squares) in the sem package
and pls (partial least squares). I am not sure about their compatibility with repeated
measurements and time series. The response curve is also likely to be non-linear.

The following script approximates the data, including sample size. In the real data, there are 18 months spread out over a
36 month period.

#generate data

tree<- gl(6,18,label = paste("tree",1:6)) month <- gl(18,1,length = 108,label = paste("month",1:18), ordered = TRUE)
trtmt <- gl(2, 54, length = 108, label = paste("trt",1:2)) pre.post <- gl(2,9,length = 108, label = c("pre","post")) response <- runif(108, min = -28, max = -25) help <- data.frame(tree,month,trtmt,pre.post, response)

Thank you in advance for your assistance.

Toby Gass

Graduate Degree Program in Ecology
Department of Forest, Rangeland, and Watershed Stewardship Warner College of Natural Resources
Colorado State University
Fort Collins, CO 80523
email: tobygass_at_cnr.colostate.edu



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 Wed 23 Apr 2008 - 17:36:04 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 23 Apr 2008 - 18:30:31 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