As the data is cross-sectional, in this case, I think that I don’t need to use any code to prepare the data for analysis, I mean I should use the below code:
Code:
ge id= _n encode patient, gen(PATIENT)
I have an independent variable that consists of two groups in the same column, where the first group named type 1 while the second group named type 2. So, in this case: what is the code to test that:
The second question:
Let us assume that the model that I want to use is the following model, and please remember that my main aim is to predict a specific complication “ Cataract”. So, the model is:
Code:
Cataract= Gender + Age + Diabetes duration
Gender is nominal variable
Age is ordinal
Diabetes duration is scale.
So, I think that I should use the ordinal logistic regression, and the code I think for this will be:
Code:
Ologit Cataract Gender Age Diabetes_duration, r
Code:
margins, dydx ( Gender) marginsplot
The third question:
I am very interested in finding whether the component of gender I mean male and female have different predictions on the dependent variable or not, if yes could you please tell me the code.
Many thanks in advance
0 Response to Ordered logistic regression to identify the predictors of Cataract progressions
Post a Comment