Skip to content

Help with model with categorical variables #12

@Ugranziol

Description

@Ugranziol

Dear Professor Moon,

I would like to code a moderated mediation with two mediators and two moderators. I attach the model I would like to create:

`labels=list(X="X_cat",M=c("M1","M2"),Y="Y")
moderator=list(name=c("W1","W2_cat"),
matrix=list(c(1,1,0,1,1,1),c(0,0,0,0,1,1)),
pos=c(1,2))

drawConcept(labels=labels,parallel=TRUE,moderator=moderator)
cat(multipleMediation(labels=labels,moderator=moderator,range=FALSE))`

The problem is that the predictor X is a categorical variable with two levels, and the moderator W2 is categorical variable with three levels.
I tried to use the catMediation function but, as far I can understand, it allows only one mediator.

Is there a way to re-create the multipleMediation output in my case?

Any help would be precious for me.

Thank you in advance for your time and availability.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions