I am trying to test for interaction effect in my logistic model where outcome is dummy and the two interacting term is categorical. One of the independent term is dummy and other one has 4 categories. When I tried to run it using y x1#x2, gives me the error below. The model runs but it doesn't give odds ratio for 0 1, 0 2, and 1 4 combination. I have attached the image from the results. urbanrural is dummy where 0 means rural and 1 means urban and cat_white has 4 categories with <5%, 6%-25%, 26%-50%, and >50%. Also, it is not using 209 observations, I have 30513 obs but the model is using 30304 obs. Please suggest what is the best possible way to handle this, so that it gives me odds ratio for all possible combinations.
note: 0.urbanrural#1.cat_white != 0 predicts failure perfectly
0.urbanrural#1.cat_white dropped and 62 obs not used
note: 0.urbanrural#2.cat_white != 0 predicts failure perfectly
0.urbanrural#2.cat_white dropped and 147 obs not used
note: 1.urbanrural#4.cat_white omitted because of collinearity
Related Posts with How to test Interaction in Logistic Regression with categorical independent variables (1 is dummy, other one has 4 categories)?
behavior of saved outputDear lister I am using Stata17 I want to save the output from 2 table commands in 2 matrixes. Afte…
Marginsplot: Changing markers by categorical value along x-axisI am summarizing percentage estimates across cities graphically, using margins and marginsplot. Howe…
Calculating a score for each firm within the same industryDear All, I hope you are staying well and keeping safe. I am new to variable creating codes and wou…
Estimate 2SLS with multi-level fixed-effects using ivregress vs reghdfe vs ivreghdfeHello Stata experts, at the moment I'm working on a project that requires the use of 2SLS method wi…
Do Not Rank If ConditionHello, In the sample attached I have ranked var: tfr_lr in var: rank_tfr_lr I would like var: tfr_l…
Subscribe to:
Post Comments (Atom)
0 Response to How to test Interaction in Logistic Regression with categorical independent variables (1 is dummy, other one has 4 categories)?
Post a Comment