[Mediation-information] non linear mediation

Weichao Bao weichaobao at gmail.com
Wed Jul 20 04:43:09 CEST 2011


Hi Everyone,

I want to run the following model in which the treatment (Hg) is a spline
function ( i.e. te(Hg)). The problem is in the model for mediate, the treat
'te(Hg)' can not be recognized by the program. How can I solve this
problem?


model.m=gam(WEIGHT~te(Hg)+BABY_SEX+parity,data=m)
model.y=gam(mr~WEIGHT+te(Hg)+ BABY_SEX,
data=m,family=binomial(link="logit"))
fit=mediate(model.m, model.y,sim=1000, boot=TRUE, treat='te(Hg)',
mediator='WEIGHT')

Thanks a lot.

Sincerely,
Bao
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/mediation-information/attachments/20110719/a08d6030/attachment.htm>


More information about the Mediation-information mailing list