Logistic Regression
Assigned Reading
AssignmentAssignments 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.
Question 1: Use the following corpus of training data. Classify if the target sentence is a complaint. The corpus is organized as in the following table. The comment ID shows the comment in the training data. In the following table, 6 comments in the training set are displayed. The columns on the right of the table show where in the training comment the words from the target comment appears. For example, in the training comment 57685 the word "patient" in the target comment is the third word in the training comment.
In the following, calculate predicted value of a logistic regression using the following formula:
Resources:
Question 2: Regress survival in next 6 months on disabilities of the patients, age of patients, gender of patients and whether they participated in the medical foster home program. MFH is an intervention for nursing home patients. In this program, nursing home patients are diverted to a community home and health care services are delivered within the community home. The resident eats with the family and relies on the family members for socialization, food and comfort. It is called "foster" home because the family previously living in the community home is supposed to act like the resident's family. Enrollment in MFH is indicated by a variable MFH=1. 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.
Resources:
Question 3: The following data provide the length of stay of patients seen by Dr. Smith (Variable Dr Smith=1) and his peer group (variable Dr. Smith = 0). Does Dr. Smith see a different set of patients than his peer group? In particular, what is the probability of patients being seen by Dr. Smith. Regress the choice of provider on the 9 diagnoses provided. Resources:
Question 4: In a nursing home, data were collected on residents' survival and disabilities. The data are listed in the following order: ID, age, gender (M for male, F for Female), number of assessments completed on the person, number of days followed, days since first assessment, days to last assessment, unable to eat, unable to transfer, unable to groom, unable to toilet, unable to bathe, unable to walk, unable to dress, unable to bowel, unable to urine, dead (1) or alive (0), and assessment number. Predict from the patient's assessments (i.e. their age and current disabilities at time of assessment) if the patient is likely to die. Here are the steps in this analysis:
Resources: Question 5: Repeat question 4 but now predict 6 month likelihood of first occurrence of walking disorders instead of death. In this analysis, exclude all assessments that occur after walking disability has occurred. Question 6: In a nursing home, data were collected on residents' survival and disabilities. The data are listed in the following order: ID, age, gender (M for male, F for Female), number of assessments completed on the person, number of days followed, days since first assessment, days to last assessment, unable to eat, unable to transfer, unable to groom, unable to toilet, unable to bathe, unable to walk, unable to dress, unable to bowel, unable to urine, dead (1) or alive (0), and assessment number. Predict from the patient's assessments (i.e., their age and disabilities at time of assessment) if the patient is likely to die and should be admitted to the hospice program.
MoreFor additional information (not part of the required reading), please see the following links: This page is part of the HAP 819 course on Advanced Statistics by Farrokh Alemi PhD Home► Email► |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||