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
Difference of two means significantly different to zeroHey guys, I need your help. So I calculated the mean of 2 groups and then calculated the difference …
Multiple graphs combined with the over option (and only one legend)Dear all, I would like to know your feedback about the following issue. I need to realize the graph …
Drop observation1==0 if Observation2==1Hello I have tried to figure out how to drop a set of observations if they meet two criteria (one of…
markstat's syntax of include htmlDear Stata users, In using -markstat- written by German Rodriguez, I encounter a question about ins…
Formatting date from MM/DD/YYYY.I'm trying to format my date but I keep getting a type mismatch error. My dates are labeled as "MM/D…
Subscribe to:
Post Comments (Atom)
0 Response to How to fix error "outcome does not vary" for OR and logistic regression
Post a Comment