I have asked this question before, but it seems that I didn’t get the answer so far, and this is because the way that I asked the question is not clear, so I will ask it in another way to get an answer, please.
I have three questions, and I need you kindly to answer the ones that you know, please.
I have cross-sectional data for the Diabetes group. I am trying to test a model that predicts a specific complication (i.e., dependent variable) by other health complications (i.e., independent variables).
Where:
The dependent variable is called Cataract and it is an ordinal variable.
The independent variables are nominal, ordinal, and scale variables.
So, I think the code at first will be:
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, I need to test if there is significant differences between the two groups or not, so in this case, I think I should create another dummy variable coded 1 for the first group and 2 for the second group, then I will use the independent sample t-test. Am I correct?
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:
Cataract= Gender + Age + Diabetes duration Where the Cataract is ordinal variable.
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:
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, so could you please tell me what is the code if I can do that?
Thanks very much in advance.
0 Response to identifying the predictors of Cataract progressions
Post a Comment