## HAP 719: Advanced Statistics I## Logistic Regression, Assumptions
## Overview-
Session overview YouTube► -
In this module, you'll master the art of analyzing the association of variables with binary data, a crucial skill in fields like healthcare, marketing, and social sciences. You'll learn to verify the assumptions of logistic regression, ensuring the validity of your models. You will tackle real-world massive data, with all of its imperfections.
## Learning Objectives- Analyze association of variables with binary data
- Verify assumptions of logistic regression
## LectureIndicates content, image, or video made with assistance from AI systems - Read Chapter 12 Logistic Regression in Statistical Analysis of Electronic Health Records by Farrokh Alemi, 2020 Slides► Video►
- Replacing logistic regression with ordinary regression Slides► YouTube► Video►
- McFadden R-squared Slides►Video►
- Yili Lin on assumptions of logistic regression, using R Slides► Videos►
- Yili Lin on performing logistic regression in R Slides► Videos►
## AssignmentsAssignments should be submitted in Blackboard. Include a summary page. In the summary page, write statements comparing your work to answers given or videos. For example, "I got the same answers as the Teach One video for question 1." Or you can write: "There was no answer sheet available for question 2." We prefer that assignments are done in R.
In the following, calculate predicted value of a logistic regression using the following formula: - Regress the classification labels in the training set on the words, pair of consecutive words, and triplets of consecutive words in the target sentence: "He loves his patients and I can tell it's about us and not the money." Use the predicted probability of complaint to classify the target sentence. Values above 0.5 should be classified as complaints.
- Regress the classification labels in the training set on the words, pair of words, triplet of consecutive words in the target sentence "However, I am not happy with rhinoplasty revision results." Use the predicted probability of complaint to classify the target sentence. Values above 0.5 should be classified as complaints.
- Repeat the analysis but this time include all of the complaints and 50% random sample of praises in the training data set. How did the sampling procedure affect the McFadden R-square
Resources: - Labeled training data set for: "He loves his patients and I can tell it's about us and not the money." Download►
- Labeled training data set for: "However, I am not happy with rhinoplasty revision results." Download►
- How to predict response variable in logistic regression ChatGPT►
- How to drop variables that are perfectly correlated? R Code►
- Full Corpus (needed for analysis of other target comments) Download► Preprocessing ChatGPT►
- Vladimir Cardenas's Answer► R Code►
- Regina Reyes's Teach One on "However, I am happy with rhinoplasty revision results." Slides► YouTube►
- Sravya's Teach One on "He loves his patients and I can tell it's about us and not the money." Slides► YouTube►
Survival is reported in two variables. One variable indicates survival in 6 months. Another reports days known to survive, if the patient has died and otherwise null. Thus a null value in this latter variable indicates the patient did not die. The functional disabilities are probabilities that the patient has the disability. These probabilities are generated from the CCS diagnoses and demographics of the person. Use long term disabilities. These are the disabilities with suffix 365. If the disability is higher than 0.5, then assume the person is disabled. - Clean the data. Convert the disabilities to binary variables. Convert the age to decades
- Create a regression model to explain the relationship among the variables and survival.
- List the top 4 predictors of survival (list these predictors using English language and not coded data).
- Describe, in English, if the MFH program contributes to survival. Provide the evidence for your claim.
Resources: - Data Download►(Use instructor's last name as password)
- Teach One Python►
- Vladimir Cardenas's Answer► R Code► (Password protected)
- Latha Sai Mounika Kona's Teach One YouTube►
- Build a model that includes only "home test results" as independent variable. Report the percent of variation explained
- Build a model that includes age and gender, interaction of age and gender, and home test results as independent variables. Report the percent of variation explained.
- Build a model that includes age and gender, interaction of age and gender, home test results, and symptoms as independent variables. Report the percent of variation explained
- Build a model that includes includes age, gender, interaction of age and gender, symptoms, home test, and pairs of symptoms, as independent variables. Report the percent of variation explained
- What is the most accurate way of diagnosing COVID-19 at home prior to triage to clinics?
- Can a clinician learn to make these diagnoses or is the number of adjustments needed beyond human capabilities?
The following resources may be helpful: - Data Download► Dictionary►
- Include interaction terms in regression ►
- Calculate McFadden R-squared ChatGPT►
- Number of times 2 symptoms occur together for the same person Data►
- Sowmya Chakravarthy's Answer► R-code►
- Yatisha Rajanala's Teach One YouTube►
## More- Convert STATA code to R ChatGPT►
This page is part of the HAP 819 course on Advanced Statistics by Farrokh Alemi PhD Home► Email► |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||