Re: [R] Measuring correlations in repeated measures data

2011-02-28 Thread Ben Bolker
On 11-02-28 11:59 AM, Brant Inman wrote: > Ben, > > Thanks for the response. Your method generates an answer that is > slightly different than what I was looking for. In the Orthodont > dataset there are 4 age groups (8, 10, 12, 14). I would like to > calculate the correlation of "distance" for

Re: [R] Measuring correlations in repeated measures data

2011-02-28 Thread Brant Inman
Ben, Thanks for the response. Your method generates an answer that is slightly different than what I was looking for. In the Orthodont dataset there are 4 age groups (8, 10, 12, 14). I would like to calculate the correlation of "distance" for all combinations of the categorical variable "ag

Re: [R] Measuring correlations in repeated measures data

2011-02-28 Thread Ben Bolker
Brant Inman mac.com> writes: > > R-helpers: > > I would like to measure the correlation coefficient between the repeated measures of a single variable > that is measured over time and is unbalanced. As an example, consider the Orthodont dataset from package > nlme, where the model is: > > fit

Re: [R] Measuring correlations in repeated measures data

2011-02-27 Thread Ista Zahn
Hi Brant, My version of Orthodont doesn't seem to have as many levesl of age as yours but the general idea is > library(MEMSS) > data(Orthodont) > library(reshape) # could use reshape function in stats package instead of cast > c.orth <- as.data.frame(cast(Orthodont, Subject + Sex ~ age, > value=

[R] Measuring correlations in repeated measures data

2011-02-27 Thread Brant Inman
R-helpers: I would like to measure the correlation coefficient between the repeated measures of a single variable that is measured over time and is unbalanced. As an example, consider the Orthodont dataset from package nlme, where the model is: fit <- lmer(distance ~ age + (1 | Subject), dat