Dear Statalist,
I have some categorical variables, for example bmi_cat (BMI category) : 1=low, 2=normal, 3=high. I have the dependent variable dep_var as 0, 1.
I want to run the logistic regression of dep_var on bmi_cat where bmi_cat = 1 will be the reference category, and I want to use stepwise method.
I am getting an error after running this
sw, pe(0.2): logistic dep_var i.bmi_cat
The error is
factor variables and time-series operators not allowed
r(101);
Is there any other way?
Thank you in advance.
Related Posts with Logistic Regression with Categorical Independent Variables using Stepwise Method
ttest means and differencesHello, In the ttest help Stata notes that a test of differences occurs by subtracting the highest v…
Loops to switch between different sub-foldersWhat is wrong with commands in this Stata do-file? I am trying to open all batch files that are in s…
Finding number of people of a given type for each groupI have a data set with 1000 observations. As an example, let's consider the following table: Grou…
sfcross commandhi i am using stata and "sfcross command" for calculating profit efficiency with cross sectional dat…
Test for heteroscedasticity and autocorrelation after SUREG command (seemingly unrelated regression)Dear community, I have run a SUREG model and wanted to get some diagnositic tests such as test of h…
Subscribe to:
Post Comments (Atom)
0 Response to Logistic Regression with Categorical Independent Variables using Stepwise Method
Post a Comment