Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Look at the data in Table 8.31 on page 464-465 of the textbook. These data are also given in the SAS code labeled Liver data

Look at the data in Table 8.31 on page 464-465 of the textbook. These data are also given in the SAS code labeled "Liver data set" and R code Liver R code on blackboard.

Complete a SAS / R program and answer the following questions about the data set

(a) Fit the regression model with the survival time, TIME, as the dependent variable, and CLOT, PROG, ENZ, and LIV as the independent variables. Perform a residual analysis, providing any relevant plots that you use to check model assumptions. Comment on any possible model violations.

(b) Fit the regression model with the (natural) log survival time, LOGTIME, as the dependent variable, and CLOT, PROG, ENZ, and LIV as the independent variables. Perform a residual analysis, providing any relevant plots that you use to check model assumptions. Are any model violations alleviated?

(NOTE: For this residual analysis, in adapting the sample code, change the PRED and RES in the code to PRED2 and RES2 so that they won't have the same names as the values in the residual analysis in part (a))

(c) Using the model you fit in (b), calculate a 90% prediction interval for the (natural) LOG survival time for a patient with clotting potential CLOT=5.5, recovery prognosis PROG=57, protein measure ENZ=62, and white blood cell count LIV=2.63. Then convert his interval to a 90% prediction interval for the survival time itself, for such a patient.

The R data:

########## ## # Reading the data into R: ff <- tempfile() cat(file=ff, " 1 3.7 51 41 1.55 34 2 8.7 45 23 2.52 58 3 6.7 51 43 1.86 65 4 6.7 26 68 2.10 70 5 3.2 64 65 0.74 71 6 5.2 54 56 2.71 72 7 3.6 28 99 1.30 75 8 5.8 38 72 1.42 80 9 5.7 46 63 1.91 80 10 6.0 85 28 2.98 87 11 5.2 49 72 1.84 95 12 5.1 59 66 1.70 101 13 6.5 73 41 2.01 101 14 5.2 52 76 2.85 109 15 5.4 58 70 2.64 115 16 5.0 59 73 3.50 116 17 2.6 74 86 2.05 118 18 4.3 8 119 2.85 120 19 6.5 40 84 3.00 123 20 6.6 77 46 1.95 124 21 6.4 85 40 1.21 125 22 3.7 68 81 2.57 127 23 3.4 83 53 1.12 136 24 5.8 61 73 3.50 144 25 5.4 52 88 1.81 148 26 4.8 61 76 2.45 151 27 6.5 56 77 2.85 153 28 5.1 67 77 2.86 158 29 7.7 62 67 3.40 168 30 5.6 57 87 3.02 172 31 5.8 76 59 2.58 178 32 5.2 52 86 2.45 181 33 5.3 51 99 2.60 184 34 3.4 77 93 1.48 191 35 6.4 59 85 2.33 198 36 6.7 62 81 2.59 200 37 6.0 67 93 2.50 202 38 3.7 76 94 2.40 203 39 7.4 57 83 2.16 204 40 7.3 68 74 3.56 215 41 7.4 74 68 2.40 217 42 5.8 67 86 3.40 220 43 6.3 59 100 2.95 276 44 5.8 72 93 3.30 295 45 3.9 82 103 4.55 310 46 4.5 73 106 3.05 311 47 8.8 78 72 3.20 313 48 6.3 84 83 4.13 329 49 5.8 83 88 3.95 330 50 4.8 86 101 4.10 398 51 8.8 86 88 6.40 483 52 7.8 65 115 4.30 509 53 11.2 76 90 5.59 574 54 5.8 96 114 3.95 830 ", sep=" ") options(scipen=999) # suppressing scientific notation liver <- read.table(ff, header=FALSE, col.names=c("obs", "clot", "prog", "enz", "liv", "time")) # Note we could also save the data columns into a file and use a command such as: # liver <- read.table(file = "z:/stat_516/filename.txt", header=FALSE, col.names = c("obs", "clot", "prog", "enz", "liv", "time")) attach(liver) logtime <- log(time) liver <- cbind(liver, logtime) # The data frame called liver is now created. ######### 

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions