<font class="Apple-style-span" face="'Times New Roman'" size="3"><div>Hi Everyone,</div><div><br></div><div>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? </div>
<div><br></div><div><br></div><div>model.m=gam(WEIGHT~te(Hg)+BABY_SEX+parity,data=m)</div><div>model.y=gam(mr~WEIGHT+te(Hg)+ BABY_SEX, data=m,family=binomial(link="logit"))</div><div>fit=mediate(model.m, model.y,sim=1000, boot=TRUE, treat='te(Hg)', mediator='WEIGHT')</div>
<div><br></div><div>Thanks a lot.</div><div><br></div><div>Sincerely,</div><div>Bao</div><div><br></div></font>