[R-sig-ME] MLM Output in nlme: Searching for coefficients to bootstrap mediation in a MLM with random intercept & random slope (to use with code generator at www.quantpsy.org)

Gerteis, Ann Kathrin Sophie (1114xxx) ann.gerteis at edu.uni-graz.at
Mon May 6 16:15:17 CEST 2013


Hi folks,

I have a question concerning the output of a multilevel model in nlme, which I want to test for mediation with a monte carlo simulation (using the r-code generator at http://www.quantpsy.org/medmc/medmc111.htm). 
I tried to figure it out myself, but now I managed to get myself really confused and basically I'm stuck at the moment. So I need advice from someone with more expertise in MLM and maybe bootstrapping (and surely statistics in gerneral, I fear).

-[- additional info concerning the data and the basic model -]-  
I'm modeling a physiological parameter (heart-rate variability) with some biobehavioral and psychological (control-)variables (v1-v9) and  psychological dependent variables (M and Y). The data stems from an ambulatory assessment with randomly repeated measures over 3 days from pairs of subjects. Therefore, the basic model is a multilevel model with a random intercept, a nested random slope and an autoregressive error structure:

basic<-lme(ln_rmssd~gz_v1+gz_v2+v3+v4+gz_v5+gz_v6+v7+v8+Y+M, random=~home|dyad/person/day, correlation=corCAR1(form=~time|dyad/person/day), na.action=na.omit). 

[Since the dataset is rather big and I'm not sure if you really need data to help, I'll not include conrcete data for now. If you think data would be necessary I could provide some]


-[- My Question -]-
I haven't been able to find and/or extract all of the requested input coefficients from my nmle-output. Quantpsy.org requests 7 input variables for the bootstrap. 
For the following 2 input coefficients I'm neither sure what they are nor do I know how to extract them from my nmle object:
        
        τaj,bj  (= "point estimate of level-2 covariances of mediator and independent variable")

        σ^2τaj,bj  (="expected variability in the level-2 covariance between the aj and bj slopes over repeated sampling", should be somewhere in the ACM for the random effects - but how do I get that?)

For the following 5 I think I know how to aquire those:
        mean(aj) & mean(bj)  
             = Parameter estimates for the relation between mediator and independent variable, extracted via the summary() for
med1<-M~Y, random=~home|dyad/person/day, correlation=corCAR1(form=~time|dyad/person/day), na.action=na.omit)  and for
med2<-ln_rmssd~v1+...+v9+Y+M, random=~home|dyad/person/day, correlation=corCAR1(form=~time|dyad/person/day), na.action=na.omit)

         σ^2a, σ^2b  & σa,b   
             = from the asymptotic covariance Matrix of the fixed effects (extracted with vcov() for med2)

One last thought: I know I could use the sobel() function, but afaik sobel calculates on the assumption of normal distributed errors, whereas the bootstrap simulates the error structure within the empirical data. Furthermore, with sobel() I can neither integrate the control variables (necessary for the prediction of ln_rmssd) nor the nesting of the data into the calculation for the mediation effect. At least, as far as I understood the whole thing...

A slight bump over the head and a "How-To"-advice for dummies would be highly appreciated!

Thank you,
Ann Kathrin


--
Gesundheitspsychologie, KFU Graz
T  +43 (0) 316 380 4950
E  ann.gerteis at edu.uni-graz.at


More information about the R-sig-mixed-models mailing list