Kyran Graham
2013-Mar-01 02:42 UTC
[R] Extracting coefficients of covariates in a LME-model
Hi all, I have created a linear mixed-effects model using lmer. My dependent variable is comp.score and my main independent variable is delay.type, a repeated-measures within-subject variable (2 levels: Synch and Asynch, order counter-balanced across participants). I had a series of covariates that were included in the initial model and used a step-wise process to produce the most parsimonious model (two covariates age and PLE). The final model was: disem<-lmer(comp.score~delay.type+age+PLE+(1|id), data=Disembodiment) The first 5 rows of the data frame appeared as follows: head(Disembodiment) id comp comp.score delay.type sex age yrs.edu PLE fds bds 4 C01 Disembodiment 1.3846685 Synch f 56 14 0 8 6 5 C01 Disembodiment 0.3782303 Asynch f 56 14 0 8 6 12 C02 Disembodiment 1.4691870 Asynch f 48 15 0 12 11 16 C02 Disembodiment 1.5863690 Synch f 48 15 0 12 11 22 C03 Disembodiment -1.3751083 Asynch m 26 15 0 13 12 23 C03 Disembodiment -0.4114244 Synch m 26 15 0 13 12 I am at the point where I am creating the plots for the data and I want to display the effects of each covariate on my dependent variable (a separate plot for each covariate), which would be achieved by finding the linear equation for each covariate and plotting it. e.g. with(Disembodiment, plot(age, comp.score, ylab="Component Score", xlab="Age (years)")) abline(coef(disem)) ## this doesn’t work but as an example My question is how do I obtain this information from my model? When I use summary(disem), I can see the slopes easily enough and I understand that the intercept is the overall mean for the data, and not the intercept for the covariates age and PLE. Do I need to alter my model in order to calculate separate intercepts for each of the covariates and, if so, how? Thanks for your help! -- Kyran Graham (PhD Candidate) School of Medicine & Pharmacology, University of Western Australia (M510) 35 Stirling Highway Crawley, WA 6009 Centre for Clinical Research in Neuropsychiatry, Graylands Hospital Private Bag No 1 Claremont, WA 6910 Phone: 9347 6430 Email: grahak02@student.uwa.edu.au [[alternative HTML version deleted]]
Possibly Parallel Threads
- I can almost feel Civilization 3 running
- Dovecot Postfix Quota Policy Service
- CentOS 6.3 LXC guest with CentOS 6.3 host
- (o2net, 6301, 0):o2net_connect_expired:1664 ERROR: no connection established with node 1 after 60.0 seconds, giving up and returning errors.
- Data corruption