I'm trying to run a multivariate regression analysis and I've found multiple variations of how to do so online, but none have yielded any usable results for me. I'm still quite new to Stata and teaching myself along the way, so hopefully this is a relatively easy fix.
My data is on drug use between two groups (A and B) of patients. The dependent variables are short-term drug use (TOTAL_SH) and long-term drug use (TOTAL_L), which I figured I would need to analyze separately. Independent variables include age, gender, and length of stay (TOTAL_LOS).
My attempt:
manova TOTAL_SH = c.AGE c.TOTAL_LOS GENDER
Stata said "GENDER: string variables may not be used as factor variables" (i didn't import any of the data as strings, so I'm a little confused about this)
When I run this without GENDER and follow with mvreg, it seems to work. I'm not sure how to de-string a variable, or why gender was imported as a string variable in the first place. Any help with this would be appreciated! If there is an easier / better way I should be doing this, I'm open to suggestions with that as well!
My data is on drug use between two groups (A and B) of patients. The dependent variables are short-term drug use (TOTAL_SH) and long-term drug use (TOTAL_L), which I figured I would need to analyze separately. Independent variables include age, gender, and length of stay (TOTAL_LOS).
My attempt:
manova TOTAL_SH = c.AGE c.TOTAL_LOS GENDER
Stata said "GENDER: string variables may not be used as factor variables" (i didn't import any of the data as strings, so I'm a little confused about this)
When I run this without GENDER and follow with mvreg, it seems to work. I'm not sure how to de-string a variable, or why gender was imported as a string variable in the first place. Any help with this would be appreciated! If there is an easier / better way I should be doing this, I'm open to suggestions with that as well!
Comment