Instructions. Work through the lab, saving the output as you go. If youwork in Microsoft Word, you can easily copy any graph to Word via theclipboard.
Numerical output may also be copied easily by highlighting,
moving it to the clipboard, then copying into Word. However, you shouldformat R output in TrueType Courier New font so that it is monospaced. Output from this lab is to be handed in by Friday, April 23. Your outputfile should be named LAST_FIRST_LAB8.DOC, where LAST is your last name,and FIRST is your first name. Any additional files should have the samenaming scheme, except the file extension should be correct. You may addany description text you wish after LAB8 in the file name.
Preamble. In today’s lab, we examine a survival analysis that includes
a time-invariant covariate as a possible source of confounding in evaluatingthe impact of a treatment.
Freireich, et al. (1963) examined the effect of a drug, 6-Mercaptopurine,on the duration of steroid-induced remissions in acute leukemia. 21 subjectsreceived the drug, and 21 paired subjects received a placebo. Data are shownbelow.
1. Set up a data file with an arbitrary id, time,treatment, censored,
2. Break the time line into 5 “periods” of 5 weeks each, except for the last
period. (Period 1 is weeks 1–5, Period 2 is weeks 6–10, but Period 5
is anyone leaving the study after 20 weeks.)
3. Add the period variable to the data.
something like this in the first 11 lines
id,t,wbc,censored,drug,period1,6,2.31,0,1,22,6,4.06,0,1,23,6,3.28,0,1,24,7,4.43,0,1,25,10,2.96,0,1,26,13,2.88,0,1,37,16,3.6,0,1,48,22,2.32,0,1,59,23,2.57,0,1,510,6,3.2,1,1,2
5. Plot the estimated hazard and survival functions for:
(b) Just the subjects in the drug (experimental) group
(c) Just the subjects in the placebo (control) group
6. Write R code to construct a person-period data file from the raw data
file. (If you get stumped, contact me for help.) Your person-perioddata should have 119 records. The first 10 records of the file shouldlook like this
"id","time","event","drug","wbc"1,1,0,1,2.311,2,1,1,2.312,1,0,1,4.062,2,1,1,4.063,1,0,1,3.283,2,1,1,3.284,1,0,1,4.434,2,1,1,4.435,1,0,1,2.965,2,1,1,2.96
7. Fit the following models to the data using the logistic link:
(a) A fully general model using dummy variables for each time period
(b) A fully general model with drug as a covariate
(c) A fully general model with wbc as a covariate
(d) A fully general model with both drug and wbc as covariates
8. Perform deviance tests and AIC comparisons, and justify on the basis
of the results that drug and wbc are both significant predictors.
9. Pick a set of reasonable “high” and “low” values for wbc. (Hint: I sug-
gest using integer values that are close to the 10th and 90th percentile.)Then, compute and plot prototypical fitted hazard and survival curveslike the ones we discussed in lecture (see graphs below), using your highand low values for wbc, and values of 0 and 1 for drug. (Don’t botherto plot for a medium wbc value. This way you will have only 4 lines andthe plot will be much easier to interpret than those from lecture shown
10. Comment on the results as portrayed in the hazard and survivor plots.
11. Now, fit a quadratic model for time with wbc and drug included as
covariates. Compare the fit of this model to the completely generalone.
12. Compute and plot the fitted hazard and survivor curves for the quadratic
model. How do they compare with the ones yielded by the completelygeneral specification?

SMOKEX Arbeitsgemeinschaft c/o W. Gerl, Konradstr. 16, D-80801 München SMOKEX ® - was ist das? SMOKEX® ist das wirksame Verfahren zur Beendigung des Rauchens, wenn es darum geht, nicht nur aufzuhören, sondern frei zu bleiben . SMOKEX® beruht auf dem therapeutischen Ansatz des Pioniers der modernen Hypnose Dr. Milton H. Erickson. SMOKEX® ist auch in Fällen wirksa

Training Packet ThyroTest® TSH Waived Inverness Medical Point of Care Diagnostic Products Better Results Mean Better Medicine® Inverness Medical CLIA Packet The following materials are provided to all Inverness Medical Customers. Laboratoriesperforming waived tests are expected to follow the manufacturer’s guidelines and good laboratory practice. Included in this packet are