Message/Author 

June Zhou posted on Friday, February 10, 2012  9:31 am



Dear All, I am running a path model with a categorical predictor. There are 12 levels in this categorical predictor. I am going to compare each level with all other levels. My question is How to code this categorical model so that I can put them into the path model? Thank you in advance! 


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? Thank you in advance! 


There are various types of coding. You should see a regression text where this topic would be discusssed. 


Dear Dr. Muthen, 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? Thank you very much for your help. 


Followup 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. 


The default for categorical dependent variable is WLSMV. You can also use ML. WLSMV gives probit regression. ML give logistic regression as the default but can also give probit regresson. Covariates in regression can be binary or continuous. In both cases, they are treated as continuous. You can create dummy variables for the ordinal variable of not. I think most would not. 


Daer Dr. Muthen, 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? Thank you in advance. 


You may want to ask that general question on SEMNET. 

Back to top 