If the categorical variable is ordered, you can treat it as continuous. Otherwise, you need to create 11 dummy variables to represent the 12 categories. You would use these dummy variables as covariates. You can create them using the DEFINE command.
June Zhou posted on Friday, February 10, 2012 - 10:20 am
Thank you very much for your prompt reply, Dr. Muthen!
The categorical variable is not ordered.
My understanding is that if I coded a level by 1 and others 0, and make it 11 dummy variables, what I am doing is to compare this level with the 12th level (reference group). Is coding method the same if I'd like to compare each level with all other levels?
I would like to conduct a path analysis with one binary predictor, two ordered categorical predictors (5 categories), and one continuous predictor. I have three binary outcome variables (two of which are also mediating variables). I understand that in such case WLSMV is used to estimate the model.
I was wondering if I should create dummy variables for my ordinal predictors or can I treat them as continuous? Should I consider possible floor and ceiling effects when deciding what to do?
Follow-up for my previous post: Can you please advice me what all should be considered when deciding whether to consider ordinal predictors (in path analysis) as continuous or to create dummy variables instead?
Thank you for your quick reply. I have another question. I wonder how appropriate it is to assume that covariates are continuous even if they are actually ordered categorical. Should I rather avoid having ordinal covariates in the model? How can I defend the decision to treat an ordinal covariate as continuous?