NErler / JointAI

Joint Analysis and Imputation of generalized linear models and linear mixed models with missing values
https://nerler.github.io/JointAI
28 stars 4 forks source link

could not find function "joint" #9

Closed KentSLDES closed 1 year ago

KentSLDES commented 1 year ago

It said could not find the function "joint"

NErler commented 1 year ago

There is no function "joint" in the package. If you could provide me with a more detailed description of what you were trying to do, I may be able to help.

KentSLDES commented 1 year ago

I am trying to join two models to test the mediation influence. I have parents' wellbeing as an independent variable (continuous variable), parenting skills patterns as the mediation variable (categorical variable), and children's behaviors as outcome (continuous variable). the model 1 is multinominal logistic regression: parenting ~ wellbeing. the model 2 is liner regression: behaviors ~ wellbeing + parenting. I want to use a joint function to combine these two. is there any suggestion?

NErler commented 1 year ago

You could try

mlogit_imp(list(parenting ~ wellbeing,
                behaviors ~ wellbeing + parenting),
           data = <...>, n.iter = <...>)

When behaviors is coded as a numeric variable, JointAI will automatically choose a linear model for this variable.