powered by
Plot of residuals against pathway variable
pathway_xvr(full_model, reduced_model, pathway_type)
Full model including covariate of interest (= pathway variable)
Reduced model excluding covariate of interest
Type of pathway values. pathway_wb are pathway values proposed by Weller and Barnes. pathway_gvalue are values as calculated by Gerring.
pathway_wb
pathway_gvalue
A plot of the chosen type of pathway values against the pathway variable created with ggplot2.
ggplot2
# NOT RUN { df_full <- lm(mpg ~ disp + wt, data = mtcars) df_reduced <- lm(mpg ~ wt, data = mtcars) pathway_xvr(df_full, df_reduced, pathway_type = "pathway_wb") # }
Run the code above in your browser using DataLab