Dear all, I have been struggling to solve this.
I imported data from excel file. And have a variable "screening" that is entered as "yes" and "no".
I have tried all these commands:
egen screeningnew = group(screening),label
destring screening, generate (screeningnew)
encode screening, generate (screeningnew)
However when i want to calculate odds ratio with another variable "sex"
command:
tabodds screeningnew sex
response variable screeningnew not coded 0/1
How do i fix this? thank you so much
Related Posts with How to fix error "outcome does not vary" for OR and logistic regression
Variable transformation for SEMHi Statalisters, I am trying to do a SEM on my data (SEM was chosen because my hypothesis involves …
Trouble merging datasetsI am trying to merge two data sets the common variable I want to use use is id. I get this error whe…
Decimal places for identification variableI am merging data and some of my ID variables have decimal places. I tried using the real function b…
Nonparametric regression: lpoly vs npgressBoth commands perform local-linear kernel estimation and allow for visulizing estimates, but what ar…
Testing for differences between groupsHello! I was tasked with proving how having the first two children of the same sex predicts whether…
Subscribe to:
Post Comments (Atom)
0 Response to How to fix error "outcome does not vary" for OR and logistic regression
Post a Comment