From kimai at Princeton.Edu Sat Mar 12 16:56:31 2016 From: kimai at Princeton.Edu (Kosuke Imai) Date: Sat, 12 Mar 2016 10:56:31 -0500 Subject: [Mediation-information] question about R mediation package In-Reply-To: References: Message-ID: I'm ccing my colleague, Kentaro, who should be able to answer this question. Kosuke Imai Professor, Department of Politics Center for Statistics and Machine Learning Princeton University http://imai.princeton.edu On Wed, Mar 9, 2016 at 8:16 PM, Wei, Yongyue wrote: > Hi Kosuke, > > > > Sorry to trouble you! I am a user of R mediation package. Now I have one > question about how to use under the following situation of two survreg > models. > > > > model.m = survreg(Surv(pfs, progress)~group, data=ds) > > model.y = survreg(Surv(os, death)~group+progress, data=ds) > > > > med = mediate(model.m, model.y, treat="group", mediator="progress", > > outcome="death", bootstrap=TRUE, sims = 1000) > > > > > > My question is: > > 1) In the outcome model (model.y), which name should I use for > mediator? ?progress?? or ?pfs?? > > 2) In mediate model, which should I use for outcome? Should be > ?death?, right? > > > > > > Thank you! > > > > > > > > Best, > > > > > > Yongyue > -------------- next part -------------- An HTML attachment was scrubbed... URL: From hirose1981 at gmail.com Sun Mar 13 16:00:14 2016 From: hirose1981 at gmail.com (Kentaro Hirose) Date: Mon, 14 Mar 2016 00:00:14 +0900 Subject: [Mediation-information] question about R mediation package In-Reply-To: References: Message-ID: Hi Yongyue, 1) If your mediator is survival time, then you should use the variable for survival time, not the one for censorship. 2) Again, if your outcome is survival time, then you should use the variable for survival time, not the one for censorship. Best, Kentaro 2016-03-13 0:56 GMT+09:00 Kosuke Imai : > I'm ccing my colleague, Kentaro, who should be able to answer this > question. > > Kosuke Imai > Professor, Department of Politics > Center for Statistics and Machine Learning > Princeton University > http://imai.princeton.edu > > On Wed, Mar 9, 2016 at 8:16 PM, Wei, Yongyue > wrote: > >> Hi Kosuke, >> >> >> >> Sorry to trouble you! I am a user of R mediation package. Now I have one >> question about how to use under the following situation of two survreg >> models. >> >> >> >> model.m = survreg(Surv(pfs, progress)~group, data=ds) >> >> model.y = survreg(Surv(os, death)~group+progress, data=ds) >> >> >> >> med = mediate(model.m, model.y, treat="group", mediator="progress", >> >> outcome="death", bootstrap=TRUE, sims = 1000) >> >> >> >> >> >> My question is: >> >> 1) In the outcome model (model.y), which name should I use for >> mediator? ?progress?? or ?pfs?? >> >> 2) In mediate model, which should I use for outcome? Should be >> ?death?, right? >> >> >> >> >> >> Thank you! >> >> >> >> >> >> >> >> Best, >> >> >> >> >> >> Yongyue >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: