From esoriano at psych.udel.edu Wed Nov 16 14:03:12 2016 From: esoriano at psych.udel.edu (Emily Soriano) Date: Wed, 16 Nov 2016 13:03:12 +0000 Subject: [Mediation-information] Question re: non-linear outcomes Message-ID: Hello, I am a third year doctoral student in clinical psychology at the University of Delaware currently working with causal mediation analysis in R. I want to thank you very much for your contributions to the field and for making this very useful tool, along with many helpful resources, freely available. I am hoping to clarify a two questions I've encountered using your R package with my data. I apologize for the length of this email, but I wanted to provide all relevant details. First, some background: I am examining a 1-1-1 multilevel mediation model using daily diary data completed by a sample of breast cancer patients. X = peNEcs = continuous, sum of daily negative events (each event coded 0 (didn't occur) or 1 (did occur)), measured at the daily level Mediator = peFORs = count distribution, fear of cancer recurrence, measured at the daily level Y = check = binary, checking behavior (single item coded 0 (no, did not check today) or 1 (yes, did check today), measured at the daily level In addition to the raw variables (above), the person means are also included as person-level covariates (peNEcgmc, peFORgmc). Time (DiaryDaygmc) is included in all models as a daily level covariate. All the relevant input/output from R can be viewed here: https://www.dropbox.com/s/si4o8wz8yk6btj6/R%20input%20output.docx?dl=0 Question 1: I am having difficulty making sense of how the estimates of the causal mediation analysis are scaled. I have read that these estimates should be on the same scale as the outcome - which, in this case, is log odds. However, estimates of the total effect and average ACME and ADE, if in log odds units, do not correspond to and in fact are much smaller than results from the preliminary regression models. While I expect the estimates to be slightly different, these estimates are different enough to make interpretation difficult. For example, the estimate of the total effect (X-->Y) from the regression model is 0.3006 (in log odd units): > totalef <- glmer(check ~ peNEcs + peNEcgmc + DiaryDaygmc + (1|?..CoupleID), family = binomial(link="logit"), data=syp) Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.592114 0.309711 -8.369 < 2e-16 *** peNEcs 0.300601 0.114772 2.619 0.00882 ** peNEcgmc 0.376437 0.326597 1.153 0.24907 DiaryDaygmc 0.006354 0.014695 0.432 0.66548 --- However, the total effect estimate from the mediation analysis is 0.02231: > multimed <- mediate(model.m, model.y, treat="peNEcs", mediator="peFORs", sims = 1000, control.value=0, treat.value=1, dropobs = TRUE) Total Effect 0.02231 -0.00232 0.04899 0.08 ACME (average) 0.01278 0.00636 0.02174 0.00 ADE (average) 0.00953 -0.01536 0.03565 0.43 Prop. Mediated (average) 0.55048 -2.00847 3.60052 0.08 There are similar patterns of divergence for the ACME and ADE as well. Using a control value of 0 and treat value of 1 in the mediate command, I believe, should allow for comparable (although not exact) estimates for the total effect estimate from 'mediate' and the slope estimate from the multilevel regression. If those estimates are on the same scale (log odds), then I would greatly appreciate any guidance about how to understand and interpret such attenuated effects via the causal mediation analysis. The relative size of the ACME does seem in line with our initial regression results, it is just the scale that I'm having trouble making sense of. Question 2: In addition, I hoped to clarify the recommended approach for using a continuous x in this framework. From my reading of your work in this area (e.g., Imai, Keele, & Tingley, 2010), I gather that the recommended approach is to run a series of 'mediate' commands, starting with control value = 0, treat value = 1, then control value = 1, treat value = 2, etc. Then one can plot the ACME estimates from the different treat/control values, and also obtain an average estimate across the different treat/control values. Am I getting this right? Do you have any additional recommendations for working with, interpreting, and reporting on the ACME with a continuous X? Thank you very much in advance for you time and assistance. Emily Soriano, M.A. University of Delaware Department of Psychological & Brain Sciences 302-831-8188 esoriano at psych.udel.edu From hirose1981 at gmail.com Wed Nov 16 14:17:46 2016 From: hirose1981 at gmail.com (Kentaro Hirose) Date: Wed, 16 Nov 2016 22:17:46 +0900 Subject: [Mediation-information] Question re: non-linear outcomes In-Reply-To: References: Message-ID: Hi Emily, Since you are using a logit model, the total effect (0.02) is estimated based on the probability scale, and this is different from the coefficient (0.30) estimated in the logit model. Best, Kentaro 2016-11-16 22:03 GMT+09:00 Emily Soriano : > Hello, > I am a third year doctoral student in clinical psychology at the > University of Delaware currently working with causal mediation analysis in > R. I want to thank you very much for your contributions to the field and > for making this very useful tool, along with many helpful resources, freely > available. I am hoping to clarify a two questions I've encountered using > your R package with my data. I apologize for the length of this email, but > I wanted to provide all relevant details. First, some background: > I am examining a 1-1-1 multilevel mediation model using daily diary data > completed by a sample of breast cancer patients. > X = peNEcs = continuous, sum of daily negative events (each event coded 0 > (didn't occur) or 1 (did occur)), measured at the daily level > Mediator = peFORs = count distribution, fear of cancer recurrence, > measured at the daily level > Y = check = binary, checking behavior (single item coded 0 (no, did not > check today) or 1 (yes, did check today), measured at the daily level > In addition to the raw variables (above), the person means are also > included as person-level covariates (peNEcgmc, peFORgmc). Time > (DiaryDaygmc) is included in all models as a daily level covariate. > All the relevant input/output from R can be viewed here: > https://www.dropbox.com/s/si4o8wz8yk6btj6/R%20input%20output.docx?dl=0 > Question 1: I am having difficulty making sense of how the estimates of > the causal mediation analysis are scaled. I have read that these estimates > should be on the same scale as the outcome - which, in this case, is log > odds. However, estimates of the total effect and average ACME and ADE, if > in log odds units, do not correspond to and in fact are much smaller than > results from the preliminary regression models. While I expect the > estimates to be slightly different, these estimates are different enough to > make interpretation difficult. > For example, the estimate of the total effect (X-->Y) from the regression > model is 0.3006 (in log odd units): > > totalef <- glmer(check ~ peNEcs + peNEcgmc + DiaryDaygmc + > (1|?..CoupleID), family = binomial(link="logit"), data=syp) > Fixed effects: > Estimate Std. Error z value Pr(>|z|) > (Intercept) -2.592114 0.309711 -8.369 < 2e-16 *** > peNEcs 0.300601 0.114772 2.619 0.00882 ** > peNEcgmc 0.376437 0.326597 1.153 0.24907 > DiaryDaygmc 0.006354 0.014695 0.432 0.66548 > --- > However, the total effect estimate from the mediation analysis is 0.02231: > > multimed <- mediate(model.m, model.y, treat="peNEcs", mediator="peFORs", > sims = 1000, control.value=0, treat.value=1, dropobs = TRUE) > Total Effect 0.02231 -0.00232 0.04899 0.08 > ACME (average) 0.01278 0.00636 0.02174 0.00 > ADE (average) 0.00953 -0.01536 0.03565 0.43 > Prop. Mediated (average) 0.55048 -2.00847 3.60052 0.08 > There are similar patterns of divergence for the ACME and ADE as well. > Using a control value of 0 and treat value of 1 in the mediate command, I > believe, should allow for comparable (although not exact) estimates for the > total effect estimate from 'mediate' and the slope estimate from the > multilevel regression. If those estimates are on the same scale (log odds), > then I would greatly appreciate any guidance about how to understand and > interpret such attenuated effects via the causal mediation analysis. The > relative size of the ACME does seem in line with our initial regression > results, it is just the scale that I'm having trouble making sense of. > Question 2: In addition, I hoped to clarify the recommended approach for > using a continuous x in this framework. From my reading of your work in > this area (e.g., Imai, Keele, & Tingley, 2010), I gather that the > recommended approach is to run a series of 'mediate' commands, starting > with control value = 0, treat value = 1, then control value = 1, treat > value = 2, etc. Then one can plot the ACME estimates from the different > treat/control values, and also obtain an average estimate across the > different treat/control values. Am I getting this right? Do you have any > additional recommendations for working with, interpreting, and reporting on > the ACME with a continuous X? > Thank you very much in advance for you time and assistance. > Emily Soriano, M.A. > University of Delaware > Department of Psychological & Brain Sciences > 302-831-8188 > esoriano at psych.udel.edu > > > _______________________________________________ > Mediation-information mailing list > Mediation-information at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/mediation-information -------------- next part -------------- An HTML attachment was scrubbed... URL: From esoriano at psych.udel.edu Fri Nov 18 21:26:46 2016 From: esoriano at psych.udel.edu (Emily Soriano) Date: Fri, 18 Nov 2016 20:26:46 +0000 Subject: [Mediation-information] Question re: non-linear outcomes In-Reply-To: References: Message-ID: Hi Kentaro, Thank you very much for your prompt and helpful response. The mediation results being on a probability scale makes much more sense in the context of the regression results. Since the logit regression model?s results are in log odds units, it sounds like R mediation package translates the results into probability units at some point behind the scenes. Am I correct in assuming this is the case for not just the total effect, but all the effects estimated in the mediate command (e.g. ACME)? I also was hoping for clarification re: my second question ? From my reading of your work in this area (e.g., Imai, Keele, & Tingley, 2010), I gather that the recommended approach is to run a series of 'mediate' commands, starting with control value = 0, treat value = 1, then control value = 1, treat value = 2, etc. Then one can plot the ACME estimates from the different treat/control values, and also obtain an average estimate across the different treat/control values. Am I getting this right? Do you have any additional recommendations for working with, interpreting, and reporting on the ACME with a continuous X? Thanks again for all of your help! Best, Emily Emily Soriano, M.A. University of Delaware Department of Psychological & Brain Sciences 302-831-8188 esoriano at psych.udel.edu On Nov 16, 2016, at 8:17 AM, Kentaro Hirose > wrote: Hi Emily, Since you are using a logit model, the total effect (0.02) is estimated based on the probability scale, and this is different from the coefficient (0.30) estimated in the logit model. Best, Kentaro 2016-11-16 22:03 GMT+09:00 Emily Soriano >: Hello, I am a third year doctoral student in clinical psychology at the University of Delaware currently working with causal mediation analysis in R. I want to thank you very much for your contributions to the field and for making this very useful tool, along with many helpful resources, freely available. I am hoping to clarify a two questions I've encountered using your R package with my data. I apologize for the length of this email, but I wanted to provide all relevant details. First, some background: I am examining a 1-1-1 multilevel mediation model using daily diary data completed by a sample of breast cancer patients. X = peNEcs = continuous, sum of daily negative events (each event coded 0 (didn't occur) or 1 (did occur)), measured at the daily level Mediator = peFORs = count distribution, fear of cancer recurrence, measured at the daily level Y = check = binary, checking behavior (single item coded 0 (no, did not check today) or 1 (yes, did check today), measured at the daily level In addition to the raw variables (above), the person means are also included as person-level covariates (peNEcgmc, peFORgmc). Time (DiaryDaygmc) is included in all models as a daily level covariate. All the relevant input/output from R can be viewed here: https://www.dropbox.com/s/si4o8wz8yk6btj6/R%20input%20output.docx?dl=0 Question 1: I am having difficulty making sense of how the estimates of the causal mediation analysis are scaled. I have read that these estimates should be on the same scale as the outcome - which, in this case, is log odds. However, estimates of the total effect and average ACME and ADE, if in log odds units, do not correspond to and in fact are much smaller than results from the preliminary regression models. While I expect the estimates to be slightly different, these estimates are different enough to make interpretation difficult. For example, the estimate of the total effect (X-->Y) from the regression model is 0.3006 (in log odd units): > totalef <- glmer(check ~ peNEcs + peNEcgmc + DiaryDaygmc + (1|?..CoupleID), family = binomial(link="logit"), data=syp) Fixed effects: Estimate Std. Error z value Pr(>|z|) (Intercept) -2.592114 0.309711 -8.369 < 2e-16 *** peNEcs 0.300601 0.114772 2.619 0.00882 ** peNEcgmc 0.376437 0.326597 1.153 0.24907 DiaryDaygmc 0.006354 0.014695 0.432 0.66548 --- However, the total effect estimate from the mediation analysis is 0.02231: > multimed <- mediate(model.m, model.y, treat="peNEcs", mediator="peFORs", sims = 1000, control.value=0, treat.value=1, dropobs = TRUE) Total Effect 0.02231 -0.00232 0.04899 0.08 ACME (average) 0.01278 0.00636 0.02174 0.00 ADE (average) 0.00953 -0.01536 0.03565 0.43 Prop. Mediated (average) 0.55048 -2.00847 3.60052 0.08 There are similar patterns of divergence for the ACME and ADE as well. Using a control value of 0 and treat value of 1 in the mediate command, I believe, should allow for comparable (although not exact) estimates for the total effect estimate from 'mediate' and the slope estimate from the multilevel regression. If those estimates are on the same scale (log odds), then I would greatly appreciate any guidance about how to understand and interpret such attenuated effects via the causal mediation analysis. The relative size of the ACME does seem in line with our initial regression results, it is just the scale that I'm having trouble making sense of. Question 2: In addition, I hoped to clarify the recommended approach for using a continuous x in this framework. From my reading of your work in this area (e.g., Imai, Keele, & Tingley, 2010), I gather that the recommended approach is to run a series of 'mediate' commands, starting with control value = 0, treat value = 1, then control value = 1, treat value = 2, etc. Then one can plot the ACME estimates from the different treat/control values, and also obtain an average estimate across the different treat/control values. Am I getting this right? Do you have any additional recommendations for working with, interpreting, and reporting on the ACME with a continuous X? Thank you very much in advance for you time and assistance. Emily Soriano, M.A. University of Delaware Department of Psychological & Brain Sciences 302-831-8188 esoriano at psych.udel.edu> _______________________________________________ Mediation-information mailing list Mediation-information at lists.r-forge.r-project.org https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/mediation-information From hirose1981 at gmail.com Sat Nov 19 12:57:12 2016 From: hirose1981 at gmail.com (Kentaro Hirose) Date: Sat, 19 Nov 2016 20:57:12 +0900 Subject: [Mediation-information] Question re: non-linear outcomes In-Reply-To: References: Message-ID: Hi Emily, (1) Yes, direct, indirect, and total effects are all estimated based on the probability scale if the outcome variable is binary. (2) As you suggested, running a series of mediate commands is I think the most straightforward way of conducting a mediation analysis when the treatment variable is continuous. Best, Kentaro 2016-11-19 5:26 GMT+09:00 Emily Soriano : > Hi Kentaro, > > Thank you very much for your prompt and helpful response. The mediation > results being on a probability scale makes much more sense in the context > of the regression results. > > Since the logit regression model?s results are in log odds units, it > sounds like R mediation package translates the results into probability > units at some point behind the scenes. Am I correct in assuming this is the > case for not just the total effect, but all the effects estimated in the > mediate command (e.g. ACME)? > > I also was hoping for clarification re: my second question ? From my > reading of your work in this area (e.g., Imai, Keele, & Tingley, 2010), I > gather that the recommended approach is to run a series of 'mediate' > commands, starting with control value = 0, treat value = 1, then control > value = 1, treat value = 2, etc. Then one can plot the ACME estimates from > the different treat/control values, and also obtain an average estimate > across the different treat/control values. Am I getting this right? Do you > have any additional recommendations for working with, interpreting, and > reporting on the ACME with a continuous X? > > Thanks again for all of your help! > > Best, > Emily > > Emily Soriano, M.A. > University of Delaware > Department of Psychological & Brain Sciences > 302-831-8188 > esoriano at psych.udel.edu > > On Nov 16, 2016, at 8:17 AM, Kentaro Hirose irose1981 at gmail.com>> wrote: > > Hi Emily, > > Since you are using a logit model, the total effect (0.02) is estimated > based on the probability scale, and this is different from the coefficient > (0.30) estimated in the logit model. > > Best, > Kentaro > > 2016-11-16 22:03 GMT+09:00 Emily Soriano esoriano at psych.udel.edu>>: > Hello, > I am a third year doctoral student in clinical psychology at the > University of Delaware currently working with causal mediation analysis in > R. I want to thank you very much for your contributions to the field and > for making this very useful tool, along with many helpful resources, freely > available. I am hoping to clarify a two questions I've encountered using > your R package with my data. I apologize for the length of this email, but > I wanted to provide all relevant details. First, some background: > I am examining a 1-1-1 multilevel mediation model using daily diary data > completed by a sample of breast cancer patients. > X = peNEcs = continuous, sum of daily negative events (each event coded 0 > (didn't occur) or 1 (did occur)), measured at the daily level > Mediator = peFORs = count distribution, fear of cancer recurrence, > measured at the daily level > Y = check = binary, checking behavior (single item coded 0 (no, did not > check today) or 1 (yes, did check today), measured at the daily level > In addition to the raw variables (above), the person means are also > included as person-level covariates (peNEcgmc, peFORgmc). Time > (DiaryDaygmc) is included in all models as a daily level covariate. > All the relevant input/output from R can be viewed here: > https://www.dropbox.com/s/si4o8wz8yk6btj6/R%20input%20output.docx?dl=0 > Question 1: I am having difficulty making sense of how the estimates of > the causal mediation analysis are scaled. I have read that these estimates > should be on the same scale as the outcome - which, in this case, is log > odds. However, estimates of the total effect and average ACME and ADE, if > in log odds units, do not correspond to and in fact are much smaller than > results from the preliminary regression models. While I expect the > estimates to be slightly different, these estimates are different enough to > make interpretation difficult. > For example, the estimate of the total effect (X-->Y) from the regression > model is 0.3006 (in log odd units): > > totalef <- glmer(check ~ peNEcs + peNEcgmc + DiaryDaygmc + > (1|?..CoupleID), family = binomial(link="logit"), data=syp) > Fixed effects: > Estimate Std. Error z value Pr(>|z|) > (Intercept) -2.592114 0.309711 -8.369 < 2e-16 *** > peNEcs 0.300601 0.114772 2.619 0.00882 ** > peNEcgmc 0.376437 0.326597 1.153 0.24907 > DiaryDaygmc 0.006354 0.014695 0.432 0.66548 > --- > However, the total effect estimate from the mediation analysis is 0.02231: > > multimed <- mediate(model.m, model.y, treat="peNEcs", mediator="peFORs", > sims = 1000, control.value=0, treat.value=1, dropobs = TRUE) > Total Effect 0.02231 -0.00232 0.04899 0.08 > ACME (average) 0.01278 0.00636 0.02174 0.00 > ADE (average) 0.00953 -0.01536 0.03565 0.43 > Prop. Mediated (average) 0.55048 -2.00847 3.60052 0.08 > There are similar patterns of divergence for the ACME and ADE as well. > Using a control value of 0 and treat value of 1 in the mediate command, I > believe, should allow for comparable (although not exact) estimates for the > total effect estimate from 'mediate' and the slope estimate from the > multilevel regression. If those estimates are on the same scale (log odds), > then I would greatly appreciate any guidance about how to understand and > interpret such attenuated effects via the causal mediation analysis. The > relative size of the ACME does seem in line with our initial regression > results, it is just the scale that I'm having trouble making sense of. > Question 2: In addition, I hoped to clarify the recommended approach for > using a continuous x in this framework. From my reading of your work in > this area (e.g., Imai, Keele, & Tingley, 2010), I gather that the > recommended approach is to run a series of 'mediate' commands, starting > with control value = 0, treat value = 1, then control value = 1, treat > value = 2, etc. Then one can plot the ACME estimates from the different > treat/control values, and also obtain an average estimate across the > different treat/control values. Am I getting this right? Do you have any > additional recommendations for working with, interpreting, and reporting on > the ACME with a continuous X? > Thank you very much in advance for you time and assistance. > Emily Soriano, M.A. > University of Delaware > Department of Psychological & Brain Sciences > 302-831-8188 > esoriano at psych.udel.edu esoriano at psych.udel.edu> > > > _______________________________________________ > Mediation-information mailing list > Mediation-information at lists.r-forge.r-project.org iation-information at lists.r-forge.r-project.org> > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/mediation-information > > _______________________________________________ > Mediation-information mailing list > Mediation-information at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/mediation-information > -------------- next part -------------- An HTML attachment was scrubbed... URL: