Learn about logistic regression in Stata with solved assignments, essays, and dissertations at Desklib. Get expert guidance on interpreting interactions in nonlinear models and mixed conditional logistic regression for habitat selection studies.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.
Running head:LOGISTIC REGRESSION IN STATA1 logistic regression in Stata institution affiliation name of student
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
LOGISTIC REGRESSION IN STATA2 Question 1a Comparison 3.a, 3.b and 3.c, the variable gender was significant in 3.a, as shown by chi-square value computed. There was an effect of the odds ratio of “getting 7 hours of sleep” due to change in gender. In the answer of 3.b, the intercept term has a significantly large effect on the odds ratio. The actual effect was due to the group variable gender which was captured in that intercept term. On the other hand, in question 3.c it was not significant. This might be because in the first two questions gender only was being compared with predictor variable getting 7 hours of sleep. Adding faculty variable in the model already containing gender reduce the significance of gender variable thus making it insignificant. This is the reason why there is a difference in question 3.c compared to the other first two questions. Therefore, the two variables should be included together in the model, or there is a need to check on the interaction of the two variables in influencing getting 7 hours of sleep(Liu, Li & Liang, 2014). Question 1b _cons.955947.2709111-0.160.874.54853861.665944 genfaculty1.257088.06409254.490.0001.1375411.389198 Faculty1.286562.10780643.010.0031.0917051.5162 Gender.4979054.0804863-4.310.000.3627024.6835076 HoursofsleepOddsRatioStd.Err.zP>|z|[95%Conf.Interval] Loglikelihood=-2884.3013PseudoR2=0.1199 Prob>chi2=0.0000 LRchi2(3)=786.01 LogisticregressionNumberofobs=5000
LOGISTIC REGRESSION IN STATA3 From the table above, it is clear that the odds ratio, corresponding to interaction effects is statistically significant at 5% level of significance since its probability value is less than the desired level of significance (0.00<0.05). Also, having the main effects of the two variables contribute to the overall significance of the model. The significance of the interaction effects of gender and faculty indicate that the two variables interact together to cause a combined effect on the getting 7 hours of sleep. However, the constant value of the model is the only insignificance coefficient in the model. The significance of interaction effects indicates the presence of an effect of the interaction of gender and faculty on getting 7 hours of sleep. It means that one unit increase ininteraction effect between Faculty and genderwill increase the odds ratio of getting 7 hours of sleep by 1.257. Moreover, if theinteraction effect between Faculty and genderscore and main effects is 0 then the odds ratio of getting 7 hours of sleep will be 0.9959 as the odds ratio for the constant term is 0.9959. The main effects of both gender and faculty are also significant as also shown above (Gerds, Scheike & Andersen, 2012)
LOGISTIC REGRESSION IN STATA4 Question 1c _cons269.6524214.75597.030.00056.609931284.447 251(omitted) 241.562147.25628082.720.0071.13262.154603 23.0990613.0277711-8.250.000.0571842.171606 22.0148196.0065801-9.490.000.0062071.0353818 21.0053896.0033374-8.440.000.0016013.0181401 151.043144.18777340.230.814.73302991.484453 141(base) 13.1212656.0330393-7.740.000.0710926.2068477 12.0151368.0086342-7.350.000.0049488.0462987 11.005949.0037262-8.180.000.0017429.0203049 Gender#Faculty Faculty.3933644.0718205-5.110.000.2750315.5626101 HoursofsleepOddsRatioStd.Err.zP>|z|[95%Conf.Interval] Loglikelihood=-2757.6657PseudoR2=0.1586 Prob>chi2=0.0000 LRchi2(9)=1039.28 LogisticregressionNumberofobs=5000 From the table above, it is clear that the odds ratio, corresponding to the interaction of gender and faculty 4 is statistically significant at 5% level of significance (0.00<0.05). This impliesthere is evidence for effect modification of gender effects by Faculty 4 (compared to the rest of the Faculties) on getting 7 hours of sleep. It also means that the interaction between faculty 4 and gender change the other categories of faculty. It means that one unit change in faculty four control on gender it will increase the odds ratio of being in faculty five by 1.0431. Moreover, if the faculty 4 modified for gender is kept at 0 then the odds ratio of all the independent variables in the model will be 269.6524 as the odds ratio for the constant term is 269.654 with p=0.002(<0.05). Furthermore, it can be seen all the other categories are a
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
LOGISTIC REGRESSION IN STATA5 statistically significant reference to faculty four confounded for gender except the fifth faculty and male. Question 2a VariableQuartile of n- 3 simulated data N3fa1234 Mean3.3055784.8134395.6128438.303328 Range1.142-5.4783.96-5.664.79-6.434.39-12.21 As seen above, the fourth quartile had the highest average n-3 fatty acids with an average value of 8.3033. It is evident that as quartile increases the average n-3 fatty acids as increases accordingly which also increase the range of its values as shown above. Question 2b
LOGISTIC REGRESSION IN STATA6 . 4.0157873.0262181-2.500.012.0006091.409174 3.115105.1171114-2.120.034.0156695.8455378 2.3271804.2802103-1.300.192.06106391.753033 n3fa4 n3fa1.144749.25599550.600.546.7385151.774438 CasecontOddsRatioStd.Err.zP>|z|[95%Conf.Interval] Loglikelihood=-92.544007PseudoR2=0.0896 Prob>chi2=0.0011 LRchi2(4)=18.21 Conditional(fixed-effects)logisticregressionNumberofobs=278 Table1: Correct model The overall model was statistically significant at 5% level of significance as shown in the table above. The model used the first quartile of n-3 fatty acids as a reference category. The odds for n-3 fatty acids was 1.144749. This means for every unit increase in n-3 fatty acids the odds of smoking and age increase by 1144749. The odds of the second quartile was not significant at 5% level of significance since its p-value was less than 0.05 as seen in the table above (0.192>0.05) (Duchesne, Fortin & Courbin, 2010). On the other hand, the 3rdquartile of n-3 fatty acids was significant at 5% since the p- value was found to be less than 5% level of significance (0.034<0.05). The odds ratio is 0.1151, implying that as one shift from faculty 1 to 3rdfaculty the odds of being a smoking increase by 0.1151 odds. Similarly, the 3rdquartile of n-3 fatty acids was significant at 5% since the p-value was found to be less than 5% level of significance (0.012<0.05). The odds ratio is 0.1579. I implied
LOGISTIC REGRESSION IN STATA7 that as one shift from the first faculty to the fourth faculty the odds of being a smoker increase by 0.1579 odds (Buis, 2010).
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.
LOGISTIC REGRESSION IN STATA8 Question 2c Ignoring the grouping variable using match ID as used in the model above and fitting the same logistic model we obtained the model below. _cons.6356923.4341668-0.660.507.16668292.424392 4.5130804.5334758-0.640.521.06685723.937521 3.6876072.3918131-0.660.511.22506492.100743 2.8895556.397178-0.260.793.3707832.134157 n3fa4 n3fa1.007773.19550360.040.968.68902211.473981 CasecontOddsRatioStd.Err.zP>|z|[95%Conf.Interval] Loglikelihood=-176.14529PseudoR2=0.0096 Prob>chi2=0.4884 LRchi2(4)=3.43 LogisticregressionNumberofobs=278 Table2: Incorrect model The model above is significant at 5% level of significance since its probability value was found to be less than 5% level of significance. (0.4484<0.05). Therefore, there was no need for studying the relationship between quartiles of n-3 fatty acids. It also does not provide any meaningful information which could be used for further research. Comparing this model with the correct model which was found to be significant at 5% level of significance, there are many differences between the two models (Buis, 2010). The correct model was significant while the incorrect model was found to be insignificant. It was also evident that no independent variable nor category was found to be significant when compared with the reference group. This implies that matching in case-control studies cannot be ignored in the analysis since matching was
LOGISTIC REGRESSION IN STATA9 accomplished in the study design. Therefore, we can conclude that there was a need to control for the confounding by the matching variables in the analysis (Williams, 2016).
LOGISTIC REGRESSION IN STATA 10 References Buis, M. L. (2010). Stata tip 87: Interpretation of interactions in nonlinear models.The Stata Journal,10(2), 305-308 Duchesne, T., Fortin, D., & Courbin, N. (2010). Mixed conditional logistic regression for habitat selection studies.Journal of Animal Ecology,79(3), 548-555. Gerds, T. A., Scheike, T. H., & Andersen, P. K. (2012). Absolute risk regression for competing risks: interpretation, link functions, and prediction.Statistics in medicine,31(29), 3921- 3930 Liu, D., Li, T., & Liang, D. (2014). Incorporating logistic regression to decision-theoretic rough sets for classifications.International Journal of Approximate Reasoning,55(1), 197-210. Williams, R. (2016). Understanding and interpreting generalized ordered logit models.The Journal of Mathematical Sociology,40(1), 7-20.