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
Managing string variablesHi STATALIST, Could you please advice me how I can produce var3 from var2: var1 is group IDs. Cod…
Getting column names when using Python in StataI am learning how to use the -sfi.Data- class when using Python in Stata. When I import the dataset …
testparm vs. contrastDear Listers, I am looking into the difference between testparm and contrast following a regression…
Wald test or any related for regression with interaction termHi all, After reading many many topics I have a question on the possibilities of any test to check …
Difference between margins and predictHi guys, I just noticed something weird and wanted your opinion, I'm probably misunderstanding how …
Subscribe to:
Post Comments (Atom)
0 Response to How to fix error "outcome does not vary" for OR and logistic regression
Post a Comment