But when I change my outcome to a 4 level factor outcome where the levels are coded as numbers (1 (No), 2 (Mild), 3 (Moderate), 4 (Severe), it reports out this way:
Causal Mediation Analysis
Nonparametric Bootstrap Confidence Intervals with the Percentile Method
For a factor variable, there are "levels". You want to make sure those levels are correctly ordered. It looks like your factor variable is ordering its levels alphabetically...
Hi,
I was wondering if there was a potential bug with how headers are reported out for the summary of a mediation object?
I have a 4-level ordinal outcome (No (1), Mild (2), Moderate (3), Severe (4)) analyzed as a factor, a continuous mediator & a binary treatment.
I ran a glm for my mediator ~ treatment & a polr for my outcome ~ treatment + mediator.
When I run the mediation analysis using the 4-level factor outcome where the levels are coded as text, and run summary(), it reports out this way:
But when I change my outcome to a 4 level factor outcome where the levels are coded as numbers (1 (No), 2 (Mild), 3 (Moderate), 4 (Severe), it reports out this way:
Is this expected behavior or have I made a mistake?
Thanks!
-Stephanie