Reference no: EM132286999
Homework -
Show your code and the portions of the output you use for each section. This will help us follow you if there is some sort of mistake.
1. Using the data ponv400.csv from last time. Table 3 of the paper (below) shows the predicted % of PONV from the model for log odds of emesis with predictors opioid, prevponv, motion, sex, and sex*prevponv interaction as in Homework 7. Using your software, estimate the predicted % of emesis for men and women with and without prevponv, but without motion sickness or opioid anesthetic. Also estimate the 95% confidence intervals for those estimates. Compare with the table below:
Table 3 Predicted and actual outcomes for the 16 patient risk groups
|
Sex (female = 1)
|
Previous PONV
|
Motion sickness
|
Opioids
|
No. of subjects
|
Predicted % of PONV
|
Actual % of PONV
|
Predicted no. of vomiters
|
Actual no. of vomiters
|
0
|
0
|
0
|
0
|
53
|
0.65
|
7.54
|
0.34
|
4
|
0
|
0
|
1
|
0
|
2
|
1.41
|
0
|
0.028
|
0
|
0
|
0
|
0
|
1
|
51
|
5.79
|
19.60
|
2.95
|
10
|
1
|
0
|
0
|
0
|
63
|
6.72
|
19.05
|
4.24
|
10
|
0
|
0
|
1
|
1
|
1
|
11.82
|
0
|
0.12
|
0
|
1
|
1
|
0
|
0
|
25
|
13.47
|
24
|
3.37
|
6
|
1
|
0
|
1
|
0
|
16
|
13.59
|
50
|
2.17
|
8
|
1
|
1
|
1
|
0
|
7
|
25.35
|
57.14
|
1.78
|
4
|
0
|
1
|
0
|
0
|
9
|
25.73
|
11.11
|
2.32
|
1
|
1
|
0
|
0
|
1
|
83
|
40.37
|
48.19
|
33.51
|
40
|
0
|
1
|
1
|
0
|
1
|
43.05
|
0
|
0.43
|
0
|
1
|
1
|
0
|
1
|
34
|
59.39
|
70.59
|
20.19
|
24
|
1
|
0
|
1
|
1
|
24
|
59.63
|
37.5
|
14.31
|
9
|
1
|
1
|
1
|
1
|
22
|
76.13
|
77.27
|
16.75
|
17
|
0
|
1
|
0
|
1
|
7
|
76.49
|
85.71
|
5.36
|
6
|
0
|
1
|
1
|
1
|
2
|
87.65
|
100
|
1.75
|
2
|
2. Using the coefficients of the model formula from your model output (above) show that the odds ratio comparing (women with motion sickness but without opioids or previous ponv) to (men without motion sickness opiods or previous ponv) is exp(βfemale)*exp(βmotion), the product of the adjusted odds ratios for female and for motion, separately. Why does this work? Briefly justify.
Use the following for questions 4-6. The dataset lowbwtm11.csv is from the text Hosmer and Lemeshow. The data are from a matched case-control study of low birth weight among babies born to women at the Baystate Medical Center. The goal was to identify predictors of low birth weight. A total of 56 cases of low birth weight babies were enrolled in the study. Controls were selected after matching on age. Variables collected were.
Variable
|
Abbreviation
|
Pair Number
|
PAIR
|
Low Birth Weight (0 = Birth Weight ge 2500g, 1 = Birth Weight < 2500g)
|
LOW
|
Age of the Mother in Years
|
AGE
|
Weight in Pounds at the Last Menstrual Period
|
LWT
|
Race (1 = White, 2 = Black, 3 = Other)
|
RACE
|
Smoking Status During Pregnancy (1 = Yes, 0 = No)
|
SMOKE
|
History of Premature Labor (0 = None, 1 = Yes)
|
PTD
|
History of Hypertension (1 = Yes, 0 = No)
|
HT
|
Presence of Uterine Irritability (1 = Yes, 0 = No)
|
UI
|
The variable "pair number" indicates a matched pair, e.g. there are two records with pair number equal to 1 corresponding to a single case-control pair.
3. Fit two models predicting low birth weight. The first will be a model ignoring the matching (an INCORRECT model as it does not properly adjust for age). The second will incorporate the matching variable represented by "pair" to perform conditional logistic regression. In these two models, use uterine irritability to predict low birth weight (with no other covariates). Compare odds ratios for low birth weight for those mothers with and without uterine irritability, their 95% confidence intervals and their p-values for significance between the two models.
4. Repeat question 3, but adjust the analysis for smoking status, history of premature labor (ptd), hypertension and weight in pounds at last menstrual period. Compare the estimated adjusted odds ratios for low birth weight for those mothers with and without uterine irritability, their 95% confidence intervals and their p-values for significance between the two models.
5. According to the conditional regression model in question 4, what is the percent change in odds for low birth weight comparing women with and without UI, after adjustment for the other factors in the model? Show your work.
6. According to the conditional regression model in question 4, what is the percent change in odds for low birth weight comparing women who are 10 pounds different at the time of last menstrual period, after adjustment for the other factors in the model? Show your work.
Attachment:- Assignment Files.rar