5/17/2023 0 Comments A better finder rename 8.78& Tingley’s method (2011) showed a significant average causal Using a 10,000 bootstraps, the mediation analysis via Imai, Keele # Mediation Sensitivity Analysis for Average Causal Mediation Effect # Estimate 95% CI Lower 95% CI Upper p-value # Nonparametric Bootstrap Confidence Intervals with the Percentile Method Med.out <- mediate(med.fit, out.fit, treat = "doors_front", mediator = "PSE", boot=TRUE, sims = 10000) # Running nonparametric bootstrap summary(med.out) # Out.fit<-lm(BMI~doors_front+PSE, data=Data) # mediate med.fit<-lm(PSE~doors_front, data=Data) # Attaching package: 'mediation' # The following object is masked from 'package:psych': require(mediation) # Loading required package: mediation # Loading required package: MASS # Loading required package: Matrix # Loading required package: mvtnorm # Loading required package: sandwich # mediation: Causal Mediation Analysis ‘multimed’ can handle multiple mediators butĬannot take continuous variables as ‘treat’. The ‘mediate’ function cannot handle multiple mediators, we therefore Postscript("dual_path.eps", horizontal = FALSE, onefile = FALSE, paper = "special") # To see the longer output, specify short = FALSE in the print statement or ask for the summary setEPS() # Mean bootstrapped indirect effect = 0.31 with standard error = 0.09 Lower CI = 0.12 Upper CI = 0.47 # Indirect effect (ab) of doors_front on BMI through PSE MOL = 0.31 # Direct effect (c') of doors_front on BMI removing PSE MOL = 0.01 S.E. # Call: mediate(y = BMI ~ doors_front + (PSE) + (MOL), data = Data, n.iter = 10000, require(psych)ĭual_path<-mediate(BMI~doors_front+(PSE)+(MOL), std=T, data= Data, n.iter=10000) Note that this averages the effect of the mediators. # 'ab' effect estimates (through all mediators) # 'b' effect estimates (M on Y controlling for X) # Direct effect estimates (traditional regression) (c') X + M on Y Summary(mediate(BMI~doors_front+(PSE), std=T, data= Data, n.iter=10000), short=F) # To see the longer output, specify short = FALSE in the print statement or ask for the summary # below calls a longer output # Mean bootstrapped indirect effect = 0.27 with standard error = 0.08 Lower CI = 0.12 Upper CI = 0.41 # Indirect effect (ab) of doors_front on BMI through PSE = 0.28 # Direct effect (c') of doors_front on BMI removing PSE = 0.04 S.E. # Total effect(c) of doors_front on BMI = 0.32 S.E. # Call: mediate(y = BMI ~ doors_front + (PSE), data = Data, n.iter = 10000, Mediate(BMI~doors_front+(PSE), std=T, data= Data, n.iter=10000) # Indirect effect was statistically significant and mediation is The bootstrapped standardized indirect effect was 0.27,Īnd the 95% confidence interval ranged from 0.12 to 0.41. Samples, and the 95% percentile confidence interval was examined via the Standardized indirect effects were computed for 10,000 bootstrapped Require(skimr) # Loading required package: skimr skim(Data) Data summary Name Require(haven) # Loading required package: haven Data<-read_spss("PSE_MOL_DOORS.sav") setwd("~/Dropbox/Teaching_MRes_Northumbria/Lecture6") Test the mediation via Imai et al.’s method.īONUS: perform the sensitivity analysis via Imai et al.’s method. The same independent and dependent variables.Įxport a figure for that mediation model. Now test a mediation model with 2 mediators (PSE and MOL) but with Test the mediation via Preacher & Hayes method. Test the mediation model: doors_front –> PSE –> BMI via theĬausal steps method by Baron & Kenny. Participants used the method of adjustment toĮstimate their body size with the same stimulus set as for the yes-no The (estimated) Point of subjectiveĮquality or PSE (the BMI they believe themselves to be) when viewing an This file containsĭata on 95 women performing various scales and body image-related tasks.ĭoors_front is the score from a gap estimation task, w_dn is the actual Download the data ‘PSE_MOL_Doors.sav’, these are the data from anĮxperiment by Kamila Irvine and Piers Cornelissen.
0 Comments
Leave a Reply. |