Hello all

I'm trying to run some path analysis in either sem or lavaan (preferably lavaan 
because I find its interface easier to use). Most of my variables are 
continuously distributed and fairly well-behaved but I have a single exogenous 
variable (sex) which is not continuously distributed. Preliminary model fitting 
suggests that there aren't any sex by (anything else) interactions. The two 
approaches to dealing with this that I've come up with are to code it as a 
numerical variable (1 & 2 for female and male) and run the analysis as normal, 
or to run two separate models, one for males and  one for females. I'd prefer 
to do the former because it will make interpretation easier and also give a 
larger sample size for the model fit but I'm not sure how acceptable that is. I 
know that some SEM packages are able to cope with categorical variables - is 
there any way to do this in R?

Thanks for any help

Regards

Rob
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to