Marianne Stephan
2011-Nov-30 19:12 UTC
[R] SAS to R: I would like to replicate a statistical analysis performed in SAS in R.
Hello everybody, A statistician performed an analysis in SAS for me which I would like to replicate in R. I have however problems in figuring out the R code to do that. As I understood it was a "covariance regression model". In the analysis, baseline was used as covariate and autoregressive (1) as covariance structure. The model included baseline, session, group and interaction between baseline and group. The degree of freedom was corrected by Kenward-Roger method. Study design: - 2 Groups: group A: n=10 subjects, group B: n=10 - 5 motor test: baseline; learning sessions immediately, 6h, 24h, and 30d after memory task - dependent variable: response time (RT) Research question: Do the two groups learn differently across time? I would appreciate a lot any help on the R commands or the choice of statistical approach. Thanks! Marianne, Columbia, SC [[alternative HTML version deleted]]
Ben Bolker
2011-Nov-30 20:20 UTC
[R] SAS to R: I would like to replicate a statistical analysis performed in SAS in R.
Marianne Stephan <mariannestephan <at> hotmail.com> writes:> A statistician performed an analysis in SAS for me which I would > like to replicate in R. I have however problems in figuring out the > R code to do that. As I understood it was a "covariance regression > model". In the analysis, baseline was used as covariate and > autoregressive (1) as covariance structure. The model included > baseline, session, group and interaction between baseline and > group. The degree of freedom was corrected by Kenward-Roger method. > Study design: - 2 Groups: group A: n=10 subjects, group B: n=10 - 5 > motor test: baseline; learning sessions immediately, 6h, 24h, and > 30d after memory task - dependent variable: response time (RT) > Research question: Do the two groups learn differently across time? > I would appreciate a lot any help on the R commands or the choice of > statistical approach. Thanks! Marianne, Columbia, SC [[alternative > HTML version deleted]]You would be better off submitting this to the r-sig-mixed-models mailing list. If possible, posting your data somewhere, or a reasonable facsimile of it, would improve your chances of getting an answer. Kenward-Roger has not been available in R until recently (see a long thread referenced at http://glmm.wikidot.com/faq on "degrees of freedom", but has recently been implemented in (an experimental version of?) the 'doBy' package. You might also get more answers if you show what you have tried so far. Ben Bolker
Seemingly Similar Threads
- Help in determining the formula for a mixed model analysis
- How can I refer to actual (n) and previous (n-1) elements in a vector?
- who happenly read these two paper Mohsen Pourahmadi (biometrika1999, 2000)
- gsub patterns from vector elements w/out loop?
- cross tabulate variables by subject id