[R] Extracting slope coefficients for each team
Pascal Oettli
kridox at ymail.com
Tue Mar 4 02:01:55 CET 2014
Hello Amanuel,
The help page is made for. Please read it and you will get the answer
to your question.
Regards,
Pascal
On Tue, Mar 4, 2014 at 1:33 AM, Amanuel Tekleab <agtekleab at gmail.com> wrote:
> Dear R-ers,
>
> I am analyzing longitudinal data using R. My objective is to test a
> relationship between a change in a variable (say X) and a change in another
> variable (say y). I have collected data at three time periods on both
> variables. I was able to run whether there was slope variability among the
> teams on each of the two variables. Thus, I ran (for each variable):
>
> model.time.x<-lme(x ~ Time, random=1|GroupID,data=NA)
> model.time.x.1< - lme(x ~ Time, random=Time|GroupID,data=NA)
> anova (model.time.x,model.time.x.1)
>
> and
>
> model.time.y<-lme(y ~ Time, random=1|GroupID,data=NA)
> model.time.y.1< - lme(y ~ Time, random=Time|GroupID,data=NA)
> anova (model.time.y,model.time.y.1)
>
> The results from the ANOVA functions above showed that the random models
> were superior to the fixed models, supporting slope variability among the
> teams.
>
> In order to test the relationship between the CHANGE in these two
> variables, I wanted to extract the slope coefficients for each team from
> "model.time.x.1" and corresponding "model.time.y.1", and use these
> coefficients in SPSS to run a simple regression.
>
> My question is: what is the function and/or the procedure to extract the
> coefficients from these models?
>
> I thank you for your help!
>
> Amanuel
>
> --
> Amanuel G. Tekleab, Ph.D.
> *Board of Visitors' Fellow*
> Associate Professor of Organizational Behavior
> School of Business Administration
> Wayne State University
> 304 Prentis Bldg.
> Detroit, MI 48202
> Phone: 313-577-9211
> Fax: 313-577-5486
>
> [[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.
--
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan
More information about the R-help
mailing list