[R] help with mediate() and medsens()
nomad545 at gmail.com
Fri Sep 16 17:34:41 CEST 2011
I'm having trouble with the mediate() and medsens() functions from the
My treatment, mediator and outcomes variables are all continuous and
scaled to the 0-1 interval. The data is observational not
experimental. I am thus using lm() for the initial outcome and
mediation regression models. I also use weights as the data are survey
(As a footnote, I use the svyglm() function from the survey package in
other analyses, but svyglm() models are not compatible with
The help file for plot.medsens() reports that
"When rho is zero, sequantial ignorability holds, so the estimated
value at that point will be equal to the estimate returned by the
mediate. The confidence level is determined by the ’conf.level’ value
of the original mediate object."
This is not the case with my data. The value of delta^1 or delta^0
when rho = 0 is not the same as the Mediation Effect produced by the
mediate() function. Through trial and error I have pinned the cause
down to my use of weights in the original lm() models.
I'm not sure why the value of the mediation effect should differ when
across mediate() and medsens() when using weights. Is there something
I am doing wrong, or missing?
many thanks for any advice / help.
More information about the R-help