This workflow separates three related questions:
The worked example examines whether dissertation-role ambiguity is associated with dissertation progress through research self-efficacy, and whether advisor support changes these associations.
| Question | Model | Focal quantity |
|---|---|---|
| Is ambiguity related to progress through self-efficacy? | Simple mediation | Bootstrap indirect effect, \(ab\) |
| Does advisor support change the ambiguity–progress association? | Moderation | Interaction, simple slopes, Johnson–Neyman region |
| Does the indirect association vary with advisor support? | First-stage moderated mediation | Conditional indirect effects and index of moderated mediation |
These models assume continuous variables and linear relations. Binary, ordinal, count, multilevel, latent-variable, and longitudinal outcomes need extensions appropriate to their measurement and dependence structure.
`n
When adapting this workflow, define the predictor, mediator, moderator, and outcome from theory before inspecting significance. Preserve an untouched source file and work only with de-identified data.
`n
| stage | n |
|---|---|
| Imported records | 520 |
| Complete cases | 491 |
| Excluded for missing analysis values | 29 |
| variable | missing_n | missing_percent |
|---|---|---|
| student_id | 0 | 0.0 |
| stage | 0 | 0.0 |
| hours_employed | 0 | 0.0 |
| caregiving | 0 | 0.0 |
| role_ambiguity | 0 | 0.0 |
| advisor_support | 9 | 1.7 |
| research_self_efficacy | 12 | 2.3 |
| dissertation_progress | 8 | 1.5 |
Complete-case analysis is used only to keep this synthetic example focused. For real studies, examine why data are missing and consider multiple imputation or another design-appropriate method rather than treating complete cases as a default.
| variable | n | mean | sd | min | max |
|---|---|---|---|---|---|
| role_ambiguity | 491 | 49.87 | 9.98 | 24.5 | 80.0 |
| research_self_efficacy | 491 | 68.50 | 9.06 | 41.4 | 92.5 |
| advisor_support | 491 | 55.54 | 10.57 | 22.0 | 84.4 |
| dissertation_progress | 491 | 55.89 | 11.13 | 24.1 | 83.3 |
| role_ambiguity | research_self_efficacy | advisor_support | dissertation_progress | |
|---|---|---|---|---|
| role_ambiguity | 1.00 | -0.57 | -0.09 | -0.42 |
| research_self_efficacy | -0.57 | 1.00 | 0.27 | 0.67 |
| advisor_support | -0.09 | 0.27 | 1.00 | 0.30 |
| dissertation_progress | -0.42 | 0.67 | 0.30 | 1.00 |
Inspect scatterplots, measurement quality, influential cases, and the plausibility of linear effects. Centering changes the meaning of lower-order coefficients but does not repair a misspecified functional form.
The mediator model estimates path \(a\). The outcome model estimates path \(b\) and the direct association \(c'\). The total-effect model estimates \(c\). The indirect effect is \(ab\).
| effect | estimate |
|---|---|
| a: ambiguity <U+2192> self-efficacy | -0.527 |
| b: self-efficacy <U+2192> progress | 0.649 |
| c’: direct association | -0.147 |
| c: total association | -0.489 |
| ab: indirect association | -0.342 |
The product \(ab\) is often asymmetric, so this workflow uses a nonparametric percentile bootstrap rather than a normal-theory test of the indirect effect.
| effect | estimate | conf_low | conf_high |
|---|---|---|---|
| Indirect (ab) | -0.342 | -0.410 | -0.280 |
| Direct (c’) | -0.147 | -0.234 | -0.060 |
| Total (c) | -0.489 | -0.569 | -0.407 |
Do not decide that mediation is “partial” or “complete” from the significance of the direct effect. Report the indirect, direct, and total estimates with uncertainty and interpret them in relation to theory and design.
The moderation model asks whether the ambiguity–progress slope changes across advisor support. Heteroskedasticity-consistent HC3 standard errors are used for coefficient inference.
| term | estimate | std_error | statistic | p_value | conf_low | conf_high |
|---|---|---|---|---|---|---|
| (Intercept) | 53.750 | 1.092 | 49.214 | 0.000 | 51.604 | 55.896 |
| ambiguity_c | -0.434 | 0.037 | -11.774 | 0.000 | -0.506 | -0.361 |
| support_c | 0.300 | 0.034 | 8.775 | 0.000 | 0.233 | 0.367 |
| stageData analysis | 6.397 | 0.947 | 6.757 | 0.000 | 4.537 | 8.258 |
| stageWriting | 11.406 | 0.895 | 12.739 | 0.000 | 9.647 | 13.166 |
| hours_employed | -0.132 | 0.034 | -3.918 | 0.000 | -0.198 | -0.066 |
| caregivingYes | -1.982 | 0.800 | -2.477 | 0.014 | -3.553 | -0.410 |
| ambiguity_c:support_c | 0.020 | 0.004 | 5.496 | 0.000 | 0.013 | 0.027 |
| support_level | support_c | estimate | std_error | conf_low | conf_high | p_value |
|---|---|---|---|---|---|---|
| Lower support (<U+2212>1 SD) | -10.575 | -0.645 | 0.052 | -0.747 | -0.542 | 0 |
| Average support | 0.000 | -0.434 | 0.037 | -0.506 | -0.361 | 0 |
| Higher support (+1 SD) | 10.575 | -0.223 | 0.054 | -0.329 | -0.116 | 0 |
The Johnson–Neyman calculation identifies moderator values where the conditional ambiguity slope changes statistical status. It is a continuous probing tool, not a data-driven cutoff for categorizing people.
| boundary_centered | advisor_support |
|---|---|
| 15.1 | 70.64 |
Interpret Johnson–Neyman boundaries only inside the observed moderator range. Sparse data near a boundary, multiple testing, functional-form errors, and influential observations can make a precise-looking cutoff misleading.
The first-stage moderated-mediation model allows advisor support to moderate path \(a\), from role ambiguity to self-efficacy. The outcome model also retains the ambiguity-by-support interaction so the conditional direct association is not forced to be constant.
| model | term | estimate | std.error | conf.low | conf.high | p.value |
|---|---|---|---|---|---|---|
| Mediator: self-efficacy | ambiguity_c | -0.488 | 0.031 | -0.548 | -0.428 | 0 |
| Mediator: self-efficacy | support_c | 0.198 | 0.029 | 0.142 | 0.254 | 0 |
| Mediator: self-efficacy | ambiguity_c:support_c | 0.015 | 0.003 | 0.010 | 0.020 | 0 |
| Outcome: progress | ambiguity_c | -0.177 | 0.042 | -0.259 | -0.095 | 0 |
| Outcome: progress | support_c | 0.196 | 0.033 | 0.130 | 0.261 | 0 |
| Outcome: progress | self_efficacy_c | 0.526 | 0.050 | 0.427 | 0.625 | 0 |
| Outcome: progress | ambiguity_c:support_c | 0.012 | 0.003 | 0.006 | 0.018 | 0 |
| support_level | support_c | indirect | direct | total | indirect_low | indirect_high | direct_low | direct_high | total_low | total_high |
|---|---|---|---|---|---|---|---|---|---|---|
| Lower support (<U+2212>1 SD) | -10.575 | -0.340 | -0.305 | -0.645 | -0.416 | -0.273 | -0.418 | -0.199 | -0.747 | -0.550 |
| Average support | 0.000 | -0.257 | -0.177 | -0.434 | -0.315 | -0.205 | -0.263 | -0.093 | -0.506 | -0.360 |
| Higher support (+1 SD) | 10.575 | -0.173 | -0.049 | -0.223 | -0.234 | -0.122 | -0.148 | 0.048 | -0.327 | -0.119 |
| effect | estimate | conf_low | conf_high |
|---|---|---|---|
| Index of moderated mediation | 0.008 | 0.005 | 0.011 |
The index of moderated mediation summarizes how much the indirect effect changes for a one-unit increase in centered advisor support. Evidence that a conditional indirect effect differs from zero at one selected support value but not another is not, by itself, evidence that the two indirect effects differ. The index and its bootstrap confidence interval address that comparison directly.
| model | breusch_pagan_p | cases_above_cooks_4_over_n | largest_cooks_distance |
|---|---|---|---|
| Mediator | 0.369 | 24 | 0.021 |
| Outcome | 0.906 | 27 | 0.051 |
A diagnostic flag is a prompt to inspect data, design, and model form; it is not an automatic reason to remove observations. If heteroskedasticity is present, report robust inference or justify an alternative. If influential cases are valid, compare conclusions with and without them and disclose material changes.
| specification | path_a_at_mean | path_b | index_modmed |
|---|---|---|---|
| Adjusted primary model | -0.488 | 0.526 | 0.008 |
| Unadjusted sensitivity model | -0.481 | 0.700 | 0.010 |
Covariates should be selected from design and substantive knowledge, not from automated significance screening. Adjusting for a descendant of the predictor or mediator can introduce bias.
A conditional-process analysis was conducted with 491 complete synthetic records. Role ambiguity was associated with research self-efficacy (path a = -0.53), and self-efficacy was associated with dissertation progress while controlling for role ambiguity and prespecified covariates (path b = 0.65). The estimated indirect association was -0.34, bootstrap 95% CI [-0.41, -0.28]; this interval did not include zero. The direct association was -0.15, bootstrap 95% CI [-0.23, -0.06.
Advisor support moderated the association between role ambiguity and dissertation progress, interaction estimate = 0.02, HC3 95% CI [0.01, 0.03], p < .001. The conditional ambiguity slope was -0.64 at lower support, -0.43 at average support, and -0.22 at higher support. These slopes are model-based comparisons at selected moderator values and should be read with the interaction plot and observed moderator range.
In the first-stage moderated-mediation model, the indirect association through self-efficacy was -0.34, bootstrap 95% CI [-0.42, -0.27] at lower support; -0.26, 95% CI [-0.31, -0.21] at average support; and -0.17, 95% CI [-0.23, -0.12] at higher support. The index of moderated mediation was 0.008, bootstrap 95% CI [0.005, 0.011]; this interval did not include zero. Because the data are cross-sectional and synthetic, these estimates demonstrate conditional associations rather than a verified causal process.
Power for an indirect or conditional indirect effect depends on several paths, measurement reliability, predictor distributions, missingness, and model complexity. A single regression rule of thumb is not adequate. Plan with simulation using plausible path sizes and the intended sampling design, and allow for incomplete records. Confirm the final plan with the dissertation advisor, committee, or a qualified methodologist.
| file |
|---|
| synthetic_conditional_process.csv |
| simple_mediation_effects.csv |
| moderation_coefficients_hc3.csv |
| moderation_simple_slopes.csv |
| conditional_effects.csv |
| index_of_moderated_mediation.csv |
| diagnostic_summary.csv |
`n