1 Introduction and Review
Overview
This lesson provides an introduction to the course and a review of key statistical concepts that underpin the design and analysis of clinical trials. Topics include a review of foundational statistical methods drawn from earlier coursework, as well as core concepts in random error, hypothesis testing, and confidence intervals that are applied throughout this course.
Objectives
Upon completion of this lesson, you should be able to:
- Distinguish between random error and bias in collecting clinical data.
- State how the significance level and power of a statistical test are related to random error.
- Accurately interpret a confidence interval for a parameter.
1.1 Interactions
It is important to examine treatment × covariate interactions. For example, it is possible that the responses in the treatment groups differ for low levels of the prognostic factor, but not differ for high levels of the prognostic factor. Interpretations of statistical results in the presence of treatment × covariate interactions can become complex.
It is unfortunate that the detection of interactions is model-dependent. For example, if the treatment × covariate interaction exists in an ANCOVA model of the outcome variable (additive model), it is possible that it will disappear in an ANCOVA model of the logarithm of the outcome variable (multiplicative model). Therefore, interactions can exist or fail to exist based on the selection of the statistical model and the assumptions associated with it.
Notice in the figure above that the difference between Treatments A and B is constant and does not depend on the value of the covariate. There is no treatment by covariate interaction in this scenario above.
Now, in the figure above, the difference between Treatments A and B is not constant and does depend on the value of the covariate.
Prognostic factors can be continuous measures (age, baseline cholesterol, etc.), ordinal (age categories, baseline disease severity, etc.), binary (gender, previous tobacco use, etc.), or categorical (ethnic group, geographic region, institution in multi-center trials, etc.).
Most prognostic factors are measured at baseline and do not change over time, hence they are called time-independent covariates. Time-independent covariates are easily included in many types of statistical models.
On the other hand, some prognostic factors do change over time; these are called time-dependent covariates. For example, consider a clinical trial in diabetics with selected dietary intake variables measured on a regular basis over the course of a six-month clinical trial. Dietary intake could affect the severity of disease and exacerbate problems for diabetic patients, so a statistical analysis of the trial might incorporate these prognostic factors as time-dependent covariates. We have to be very careful when using time-dependent covariates.
A statistical analysis that uses time-dependent covariates can yield misleading results if the time-dependent covariates are affected by treatment. In such a situation, removal of the effect of the time-dependent covariates can also cause removal of the treatment effect. For example, suppose that one of the treatments in the aforementioned diabetes example has an additional effect of increasing appetite. Then removing the effect of dietary intake also could remove the effect of the treatment!
The schematic below represents the situation where the treatment is affecting both the covariates and the outcome. The covariates also affect the outcome. Adjusting for the effect of the covariate over time may account for the majority of the treatment effect on the outcome.
1.2 Model-Based Methods: Continuous Outcomes
A model relating the outcome variable to the prognosic factors and treatment effects is a construct that makes use of theoretical knowledge and empirical knowledge. In mathematical and statistical models, the theoretical component is represented by one or more equations and the empirical component is represented by data. The behavior of a model is governed by its structure or functional form and by the unknown quantities or constants (parameters). Objectives of the modeling exercise might include estimation of the parameters, determination of model fit, or efficient summarization of large amounts of data.
Dr. George Box once stated: “All models are wrong, but some are useful.”
A linear model often is used for describing a continuous outcome variable. In this situation, “linear” refers to the fact that the deterministic component of the model is a linear combination of parameters and covariates. Statistical models typically contain a deterministic component and a random component.
An example is the linear model that is used for multiple regression. Let Y denote the outcome variable and \(X_1, X_2, \dots , X_K\) denote K different regressors (predictors) that are measured on each of n patients. Then the statistical model for patient \(i, i = 1, 2, \dots , n\), is
\[ Y_i = \beta_0 + \beta_{1} X_{1i} + \beta_{2} X_{2i} + \dots + \beta_{K}X_{Ki} + \epsilon_i \]
where \(\beta_0\) is the intercept, \(\beta_{1}, \beta_{2}, \dots , \beta_{K}\) are the slopes for the K regressors, and \(\epsilon_{i}\) represents the random error term for patient i.
In the multiple regression model, \(\beta_{0} + \beta_{1}X_{1i} + \beta_{2}X_{2i} + \dots + \beta_{K}X_{Ki}\) represents the deterministic portion of the model for patient i and \(\epsilon_{i}\) represents the random error term for patient \(i, i = 1, 2, \dots , n\).
Typically, we assume that \(\epsilon_{1}, \epsilon_{2}, \dots , \epsilon_{n}\) are independent and identically distributed random variables, each following a \(N\left(0, \sigma^{2}\right)\) distribution.
A linear model for a one-way analysis of variance (ANOVA) is:
\[ Y_{ij}=\mu_i + \epsilon_{ij} \]
where \(i = 1, 2, \dots , K\) denotes the \(i^{th}\) treatment group, \(j = 1, 2, \dots\), ni denotes the \(j^{th}\) patient within the \(i^{th}\) treatment group, \(\mu_{i}\) denotes the population mean for the \(i^{th}\) treatment group, and \(\epsilon_{ij}\) represents the random error term for the \(j^{th}\) patient within the \(i^{th}\) treatment group.
A linear model for a one-way analysis of covariance (ANCOVA) with three covariates is:
\[ Y_{ij}=\mu_i+\beta_1X_{1ij}+\beta_2X_{2ij}+\beta_3X_{3ij}+\epsilon_{ij} \]
where the notation is similar to that for the one-way ANOVA with K treatment groups, and \(X_{1ij}, X_{2ij}, X_{3ij}\) denote the values of the three covariates for the \(j^{th}\) patient within the \(i^{th}\) treatment group.
The covariates in an ANCOVA model (the regressors in a multiple regression model) may be continuous, ordinal, or binary.
If a covariate is categorical with L levels, it might be necessary to recode it as L - 1 distinct covariates that are binary (called dummy variables). One way to do this is to select a reference level and let the dummy variables correspond to the remaining L - 1 levels.
For example, suppose that there are four centers in a multi-center trial and that it is desirable to model for center effects. The above ANCOVA model can be invoked with center #4 as the reference level:
\(X_{1ij} = 1\), if patient (i,j) is in center #1; 0 otherwise
\(X_{2ij} = 1\), if patient (i,j) is in center #2; 0 otherwise
\(X_{3ij} = 1\), if patient (i,j) is in center #3; 0 otherwise
The implications of the model are that \(\mu_{1}, \mu_{2}, \dots , \mu_{K}\) represent treatment means within the reference center (center #4). Patients within center #1 have treatment means \(\mu_{1} + \beta_{1}, \mu_{2} + \beta_{1} , \dots , \mu_{K} + \beta_{1}\), so that \(\beta_{1}\) represents the change in any treatment mean between center #4 and center #1.
Statistical software packages for multiple regression typically require the user to recode categorical regressors/covariates in this manner (SAS PROC REG), whereas the statistical software packages for ANOVA and ANCOVA can recode categorical regressors/covariates for the user (the CLASS statement in SAS PROC ANOVA and SAS PROC GLM).
New regressors/covariates can be constructed as interactions among other regressors. For example, suppose that \(X_{1}\) represents age and \(X_{2}\) represents serum cholesterol. A third regressor, \(X_{3} = X_{1} × X_{2}\), can be constructed as the product and might be important to include in the model if only old age in combination with high cholesterol has an impact on the outcome.
This example is called a first-order interaction and higher-order interactions can be constructed as products of more than two regressors. Of course, constructing more regressors in this manner can get unwieldy and lead to an unmanageable number of potential regressors to consider.
Treatment × covariate interactions are important to investigate in randomized and nonrandomized studies. Treatment × center interactions are important to investigate in multi-center trials.
If the treatment × covariate interactions are important, then it could be difficult to interpret main effects for treatment.
For example, suppose that in a two-armed trial (treatments A and B) baseline cholesterol level is considered an important covariate. Suppose that the treatment × cholesterol interactions are significant such that for low cholesterol levels treatment A is better than treatment B, but for high cholesterol levels treatment B is better than treatment A. Thus, it is not possible to conclude that one treatment is superior because the choice of the best treatment depends on baseline cholesterol levels, an important discovery in and of itself.
If the investigator focuses on a specific region of values for the covariate, such as high baseline cholesterol, then it may be possible to determine which treatment is superior in this region.
Sometimes it is possible to make general conclusions if the interactions are due to the magnitude of the effect.
For example, suppose treatment A is 20 units better than treatment B in the presence of low baseline serum cholesterol, but treatment A is 60 units better than treatment B in the presence of high baseline serum cholesterol levels. Even though there is significant treatment × covariate interactions, it still appears that treatment A is superior. This type of treatment × covariate interactions is called “quantitative.”
Profile plots (mean outcome response versus the covariate) for each treatment group will indicate graphically whether the interactions are qualitative (not parallel and crossing, below),
or quantitative (not parallel but not crossing).
Example 1.1 (Multiple Regression) Download the code: sas_multiple_regression.sas
Hover over the numbered circle icons in the code to display brief explanations describing what that section of the program does.
*******************************************************************************************
* The following data set is taken from the PCAT (Parent-Child Auto-Tutorial) Study: *
* Tershakovec AM, Shannon BM, Achterberg CL, McKenzie JM, Martel JK, *
* Smiciklas-Wright H, Pammer SE, Cortner JA. (1998). One-year follow-up *
* of nutrition education for hypercholesterolemic children. American Journal of *
* Public Health 88, 258-261. *
* *
* This data set consists of baseline measurements on 261 of the participants at baseline. *
*******************************************************************************************;
proc format;
value sexfmt 1='Male' 2='Female';
value racefmt 1='White' 2='Black' 3='Oriental' 4='Iranian' 5='Indian' 6='Hispanic';
run;
data pcat_baseline;
input subjno age sex race ldl totchol triglyc hdl calprot calfat calcarb dchol dfiber;
label subjno ='Subject #'
age ='Age'
race ='Race'
ldl ='LDL Cholesterol (mg/dL)'
totchol='Total Cholesterol (mg/dL)'
triglyc='Triglycerides (mg/dL)'
hdl ='HDL Cholesterol (mg/dL)'
calprot='% Calories from Protein'
calfat ='% Calories from Fat'
calcarb='% Calories from Carbohydrates'
dchol ='Dietary Cholesterol'
dfiber ='Dietary Fiber';
format sex sexfmt. race racefmt.;
cards;
110013 8.23 1 1 109.5 181.0 120.5 47.5 13.80 24.09 62.54 303.95 14.30
110019 9.27 2 1 117.0 191.0 117.0 50.5 21.70 34.65 43.19 115.82 4.66
110042 4.26 1 1 123.5 188.5 111.0 42.5 8.55 32.81 61.45 53.56 8.81
110067 5.75 2 1 117.5 185.5 69.0 54.5 13.95 23.06 64.55 100.15 14.79
110109 5.57 2 1 123.0 184.5 90.0 43.5 12.56 24.80 63.95 67.15 7.63
110110 8.53 1 1 112.0 163.5 58.5 39.5 15.66 27.24 59.67 120.76 16.23
110115 5.59 1 1 118.5 180.0 59.0 50.0 11.69 33.12 57.20 575.64 10.10
110118 4.88 2 1 144.0 207.0 81.0 46.5 11.29 20.45 68.71 53.94 11.87
110120 6.74 2 1 135.5 206.5 74.5 56.0 13.15 30.40 55.74 102.22 6.42
110123 8.55 2 2 127.5 192.5 66.5 51.5 11.41 48.41 40.44 135.20 8.15
110135 9.18 2 1 132.5 201.0 47.0 59.0 14.42 25.45 62.04 113.81 14.23
110149 9.83 1 1 114.0 190.5 77.0 61.0 12.72 35.81 53.01 85.73 8.31
110167 6.30 1 1 119.5 194.5 51.5 64.5 12.28 24.26 64.31 133.50 14.26
110232 8.63 2 1 115.0 192.0 153.5 46.0 9.66 25.60 64.47 49.06 6.97
110239 9.48 2 2 127.5 205.0 59.0 66.0 7.39 40.07 53.19 333.29 15.97
110244 5.51 2 1 138.5 213.5 66.5 61.5 11.63 40.38 48.99 311.83 12.29
110254 5.87 1 1 109.0 170.0 72.0 47.0 9.70 24.06 68.47 81.75 16.20
110261 8.13 2 1 154.0 213.5 93.5 40.5 11.20 25.51 64.66 139.45 11.46
110270 4.03 1 1 110.0 173.0 70.0 49.0 12.71 16.59 71.09 74.02 12.29
110678 6.20 2 1 133.5 190.5 81.0 41.0 11.53 40.57 48.67 95.80 8.69
111001 9.45 1 1 116.0 188.0 48.0 62.5 22.26 42.53 35.36 298.24 12.89
111003 8.11 1 1 112.0 183.0 59.0 59.0 9.80 24.16 68.33 65.52 11.57
111005 7.93 2 1 133.5 193.5 53.5 49.5 13.85 44.73 42.78 535.55 9.56
111014 7.06 1 1 127.0 193.0 61.5 53.5 10.70 28.73 63.20 89.92 14.34
111019 4.53 1 1 133.0 191.0 91.0 40.0 12.75 22.53 68.10 88.55 12.41
111025 6.95 1 1 111.0 186.0 75.5 60.0 12.64 26.02 61.65 76.90 5.45
111036 6.24 2 1 119.0 188.0 103.0 48.5 9.35 23.74 68.84 182.52 10.96
111071 9.42 1 1 118.0 189.5 73.5 57.0 7.93 20.30 74.66 20.85 4.46
122063 4.31 1 1 110.0 184.5 155.0 43.0 15.74 47.75 40.19 162.17 18.81
122088 8.31 2 1 144.5 235.0 54.5 79.5 14.23 46.41 40.48 101.10 5.10
122095 4.21 2 1 131.0 196.0 54.5 54.0 15.10 36.90 48.49 473.76 3.60
122117 7.35 2 1 120.5 181.0 58.5 48.5 11.79 37.47 51.69 240.19 7.54
122154 8.04 2 1 135.0 210.0 99.0 55.5 18.23 26.92 56.75 168.26 18.77
122158 8.13 1 1 124.0 193.5 78.5 54.0 13.24 22.96 67.35 48.36 12.23
122172 4.79 2 2 113.0 194.0 76.5 65.5 19.52 34.96 47.98 166.31 10.08
122206 7.21 2 1 126.5 191.0 82.0 48.0 12.17 36.17 51.79 115.30 5.50
122223 4.15 1 1 109.0 173.5 49.5 54.5 23.63 36.68 41.36 359.73 7.04
122231 4.11 2 1 150.5 221.5 152.0 40.5 11.80 32.68 57.49 79.33 8.32
122246 7.39 1 1 118.5 189.5 58.0 59.5 17.08 24.34 58.90 137.09 11.74
122251 8.27 1 1 114.5 193.0 50.0 68.5 9.77 33.73 57.70 181.32 5.30
122307 7.13 1 1 107.5 199.0 53.0 80.5 10.59 27.77 63.69 125.21 7.12
122309 9.20 2 1 148.5 214.0 97.5 46.0 13.76 41.66 45.59 177.87 14.87
122318 5.08 1 1 135.0 198.0 79.0 47.5 11.26 36.51 52.36 88.12 7.31
122330 7.05 2 1 124.0 189.5 82.5 49.0 8.81 15.78 75.07 102.98 9.52
122356 9.08 2 1 137.0 204.0 57.0 55.5 17.68 28.61 54.06 211.09 10.27
122386 6.82 1 1 149.5 218.0 81.0 52.5 12.64 34.25 56.38 52.99 8.65
122397 4.16 1 2 141.0 203.5 64.5 49.5 10.16 23.13 68.46 64.56 18.91
122401 6.35 2 1 125.5 191.0 93.5 47.0 11.23 31.46 61.32 56.34 15.64
122404 4.30 1 1 140.0 206.0 65.5 53.0 18.99 33.77 48.58 140.24 8.99
122416 8.79 1 2 120.0 186.5 103.0 46.0 13.02 35.01 54.02 86.44 7.51
122421 8.30 2 2 133.0 181.5 42.0 40.5 15.85 49.61 38.86 96.55 16.81
122426 4.10 2 1 121.0 176.5 79.5 39.5 18.37 45.77 35.64 378.38 5.82
122444 6.51 1 1 119.0 187.5 112.0 46.0 13.59 29.36 56.94 171.98 8.97
122495 8.78 1 1 110.0 186.0 49.0 66.0 10.19 34.77 56.00 119.14 7.30
122514 3.95 1 2 140.0 207.5 64.0 54.5 18.32 31.82 49.16 105.02 6.13
122516 8.35 1 1 137.5 215.0 66.5 64.5 12.91 36.71 51.40 62.40 6.84
135016 6.32 1 1 115.5 185.5 91.0 51.5 15.29 32.69 54.84 94.89 11.72
135017 9.46 1 1 118.5 203.0 123.5 59.5 16.55 32.57 51.58 174.98 8.08
135027 5.05 1 1 119.0 184.0 80.5 48.5 19.70 41.19 39.14 217.69 2.10
135046 4.24 1 1 126.0 196.0 121.5 46.0 6.45 7.77 88.67 12.64 7.22
135054 4.04 1 1 133.5 189.0 50.5 45.0 17.28 31.41 49.97 99.51 5.05
135060 4.05 2 1 123.0 188.0 187.5 27.5 16.88 29.10 56.40 81.52 5.60
135066 4.08 1 1 115.0 183.5 96.5 49.5 12.91 27.29 59.81 75.23 4.32
135068 4.04 1 1 150.0 221.0 92.5 52.5 11.01 13.08 78.93 86.39 8.17
135086 4.22 1 1 146.5 212.0 138.5 38.0 10.54 15.51 74.78 68.20 4.78
135098 5.49 1 1 145.5 205.5 59.5 48.0 11.46 16.67 75.12 79.33 20.95
135104 5.14 2 1 119.5 183.5 68.5 50.5 14.95 17.98 69.91 80.49 20.10
135111 4.05 2 1 130.0 188.5 79.5 43.0 16.09 42.00 42.74 130.70 4.42
135124 4.19 2 1 125.0 182.5 65.0 44.5 12.53 38.73 49.91 70.44 6.23
135133 5.16 1 1 132.0 177.0 86.0 37.0 12.66 9.90 79.41 39.64 9.15
135148 6.84 1 1 124.5 185.5 98.5 41.5 12.50 26.11 60.88 118.63 7.57
135173 6.72 2 1 114.0 173.5 60.5 47.5 11.48 22.26 66.73 267.20 19.07
135175 7.05 2 1 122.0 184.0 45.5 52.5 9.14 25.24 65.97 400.31 3.67
135209 4.31 1 1 135.0 187.0 54.5 41.0 17.45 27.18 54.79 279.43 12.65
135238 5.29 2 1 124.5 191.5 114.5 44.0 9.18 30.75 64.31 59.25 13.23
135268 4.67 1 1 124.0 199.5 110.5 53.5 10.27 27.81 64.14 152.16 10.58
135287 4.06 1 1 116.0 176.5 72.0 46.0 13.68 26.30 60.46 116.63 5.97
135289 4.48 1 5 149.0 219.5 99.0 50.5 14.01 33.33 52.97 116.03 2.44
135336 4.03 1 1 148.5 207.5 114.5 36.0 11.98 27.69 61.14 139.23 6.38
135338 4.24 2 1 161.0 231.0 93.0 51.5 13.32 14.45 76.49 20.31 9.79
135342 9.68 1 2 127.0 201.5 90.5 56.5 15.42 35.50 49.18 498.45 14.87
135344 9.88 2 1 119.0 191.0 76.0 57.0 13.06 36.32 52.17 103.29 10.45
135351 4.19 1 1 120.0 194.5 53.5 63.5 10.69 36.33 55.32 171.86 8.52
135390 7.40 2 1 113.5 170.5 98.0 37.5 14.66 39.26 46.21 374.73 16.89
135395 6.10 1 1 109.0 173.0 47.5 54.5 9.81 31.58 59.32 76.99 13.24
135606 6.05 2 1 140.5 210.5 133.5 43.5 11.59 29.36 59.58 187.12 6.30
135624 5.57 2 4 130.5 191.5 69.0 47.0 11.03 34.76 56.39 179.55 20.67
135629 4.19 2 1 133.0 219.5 89.0 69.0 13.20 23.93 64.66 71.01 10.44
135631 6.04 2 1 121.0 193.0 61.0 60.0 11.04 35.66 54.68 223.41 14.31
135635 4.03 1 6 111.5 170.5 69.0 45.0 14.51 25.96 61.90 125.04 20.65
135663 8.97 1 1 122.0 202.5 57.0 69.0 20.64 37.84 41.84 187.55 13.89
135669 7.10 2 1 125.0 185.5 78.5 44.5 17.15 37.20 45.22 267.85 10.79
135676 4.05 1 6 119.5 201.5 45.5 72.5 9.66 19.84 72.22 52.73 16.19
135682 4.23 2 1 137.5 194.0 77.5 41.0 11.29 29.69 60.89 41.17 5.01
135685 4.54 2 1 131.5 205.5 114.0 51.5 12.01 31.29 57.68 85.50 8.28
135704 4.01 2 1 123.0 184.5 68.5 48.0 16.22 21.51 63.89 43.84 11.26
146506 6.29 2 1 111.5 175.5 99.5 44.5 16.21 37.95 47.06 209.94 10.78
146507 9.41 2 1 129.5 192.0 92.5 44.0 18.19 47.71 33.80 401.57 2.17
146520 8.17 2 1 118.5 181.0 61.5 50.0 13.60 35.95 52.08 221.82 14.54
146525 7.47 2 1 136.0 205.5 56.0 58.0 13.38 34.97 53.34 170.45 15.98
146527 7.47 1 1 117.5 196.5 51.5 68.5 20.58 40.13 39.44 766.00 11.73
146544 5.40 1 1 144.5 206.0 83.0 45.0 14.66 29.38 56.40 224.47 11.16
146564 6.06 1 1 121.0 201.0 67.5 66.5 9.48 33.66 59.53 129.10 13.10
146576 7.03 1 1 120.5 183.0 79.0 46.5 9.18 29.49 61.81 95.21 11.45
146603 7.93 2 1 120.5 193.5 98.0 53.0 13.02 26.19 64.61 92.88 15.69
146611 6.17 2 1 154.5 232.5 58.5 66.5 15.51 39.54 45.09 116.91 4.05
146682 5.06 1 1 136.0 201.5 97.5 46.0 13.51 25.73 60.62 80.42 4.97
146703 8.11 1 1 124.5 195.5 68.5 57.5 17.54 25.60 56.64 123.25 8.94
146720 5.25 2 1 114.5 176.0 143.0 33.0 12.56 29.28 58.22 75.82 7.69
146736 5.57 1 1 111.5 183.0 168.5 38.0 9.58 29.11 64.33 111.66 13.55
146773 5.13 1 1 109.5 167.5 56.0 47.0 15.26 28.22 57.10 100.64 7.10
146775 5.05 1 1 161.0 224.0 137.0 35.5 11.35 38.17 50.17 102.68 12.97
146790 8.19 2 1 153.5 223.0 88.5 52.0 21.21 44.14 34.37 404.68 13.26
146807 4.06 2 1 134.5 210.0 43.0 67.0 19.79 33.21 48.01 186.39 11.29
146808 4.14 2 1 111.5 176.0 51.5 54.0 13.02 31.37 56.57 173.18 5.49
146814 9.51 2 1 130.0 193.0 82.5 46.5 19.04 26.64 54.50 160.76 14.43
146829 5.36 1 1 142.5 201.0 100.0 38.5 16.47 27.75 56.11 299.46 5.87
146841 9.08 2 1 115.5 184.5 89.5 51.0 11.48 32.34 55.68 132.47 7.36
146909 6.89 1 1 110.0 178.0 82.0 51.5 15.93 27.37 57.34 175.16 7.46
146922 8.92 1 1 115.0 183.5 104.5 47.5 10.55 29.30 60.51 239.09 13.01
146932 5.66 2 1 133.5 208.0 99.5 54.5 21.24 28.49 52.56 169.07 14.89
146947 7.06 2 1 127.5 193.0 59.0 54.0 14.43 28.14 60.19 148.20 13.91
146968 8.12 1 1 130.0 206.5 93.5 58.0 17.30 45.48 36.79 212.00 9.27
147261 7.12 2 1 112.0 177.0 45.5 55.5 14.56 32.95 54.48 225.71 27.19
147264 6.12 2 1 145.0 207.5 70.0 48.5 9.89 27.44 65.61 75.28 15.98
147270 4.02 2 1 119.5 174.5 91.5 36.5 10.94 29.38 61.53 78.07 11.11
147293 7.18 2 1 148.0 218.0 105.5 49.0 12.72 27.47 61.20 109.32 19.36
147322 6.08 2 1 155.0 223.5 120.0 44.5 10.49 39.78 51.29 140.86 15.40
147348 6.59 1 1 113.5 182.5 70.5 55.0 11.91 39.25 51.24 276.64 12.54
147386 6.99 2 1 115.0 185.0 117.0 46.5 14.14 29.55 59.49 140.65 10.89
147387 5.00 2 1 113.0 188.0 127.5 49.5 13.59 40.88 45.90 91.74 6.20
147390 6.06 2 1 136.0 203.5 54.5 57.0 14.31 26.25 61.87 164.92 13.52
147401 6.13 2 1 121.5 182.5 68.0 47.5 16.41 19.32 65.97 66.17 8.55
147430 8.28 1 1 110.5 177.5 95.0 48.0 13.72 31.41 56.80 168.54 21.61
147445 5.70 2 1 129.5 188.5 114.0 36.5 12.80 25.07 64.45 59.39 6.82
147463 4.94 1 1 107.5 167.5 130.5 34.0 12.52 31.74 56.41 127.56 13.94
147464 9.10 2 1 163.0 231.5 85.5 51.0 13.79 39.04 47.90 140.70 8.22
147468 6.21 2 1 125.0 205.5 66.0 67.0 10.36 24.96 66.46 50.67 4.87
147488 5.14 2 1 117.0 184.0 95.5 48.0 13.19 29.52 57.85 56.70 6.19
147494 7.15 1 1 132.0 195.0 84.0 46.0 12.18 21.84 68.03 302.15 8.97
147495 8.08 2 1 111.5 176.5 68.5 51.5 12.23 16.83 73.67 61.03 14.89
147498 4.12 1 1 118.5 178.5 49.5 50.0 9.70 26.29 62.84 66.10 7.26
147516 8.14 1 1 108.5 183.0 127.5 49.0 12.84 25.18 63.38 180.46 12.68
147523 7.10 1 1 151.0 203.5 101.5 32.0 11.89 27.75 62.53 107.05 21.57
147532 7.07 1 1 125.5 191.0 85.5 48.0 13.59 30.65 56.39 111.08 6.80
147538 9.72 2 1 121.0 193.5 133.0 46.0 15.68 39.93 44.19 260.40 14.81
147540 8.08 2 1 135.0 197.5 80.0 46.5 18.82 42.05 39.51 426.24 10.45
147704 4.07 2 1 126.0 208.5 97.5 63.0 17.53 17.79 66.57 78.19 7.95
147706 5.87 1 1 111.0 181.0 67.5 56.5 12.65 30.81 56.62 104.33 4.37
147709 6.13 1 1 151.5 223.0 62.5 59.0 18.08 41.60 42.68 607.51 12.06
147714 8.53 1 1 138.0 211.5 99.5 53.5 13.10 22.10 65.12 79.57 13.53
147715 4.03 1 1 123.5 192.5 76.0 54.0 11.25 36.22 53.85 115.58 13.70
147726 6.37 1 1 109.5 169.5 58.5 48.5 13.54 28.69 58.36 175.52 12.80
147730 6.07 2 1 113.0 187.5 83.0 58.0 11.55 32.94 58.47 252.49 27.43
147742 8.45 2 1 135.5 210.0 101.5 54.0 15.37 13.56 72.00 127.71 12.62
147748 4.98 1 1 118.5 192.0 162.5 41.0 9.91 10.49 81.58 15.11 6.35
147769 7.16 1 1 112.5 176.0 82.5 47.0 13.96 28.41 59.64 549.35 4.67
147779 4.05 2 6 135.0 205.5 79.0 55.0 18.17 20.73 62.61 234.87 22.57
147791 4.26 2 1 113.5 180.0 99.0 46.5 13.31 28.02 64.42 11.46 13.58
147794 6.83 1 3 123.5 205.0 55.5 70.5 14.74 41.11 45.26 101.13 5.74
147808 5.04 2 1 124.0 182.0 91.5 38.5 16.91 11.79 73.26 49.52 17.38
147825 4.69 1 1 118.5 197.0 155.5 47.5 8.19 16.33 76.62 40.60 6.14
147829 6.26 1 1 130.5 198.5 49.5 58.0 13.74 22.47 65.10 62.85 8.94
147833 9.88 1 1 136.0 198.5 106.0 41.5 12.75 26.37 60.70 173.08 10.63
147839 5.03 2 1 156.5 228.5 164.0 39.5 17.64 21.59 61.37 142.86 9.94
147848 4.07 1 2 139.5 205.0 63.5 52.5 16.99 29.00 55.02 88.40 3.57
147852 8.10 1 1 116.0 183.0 54.0 56.0 12.45 37.81 51.15 230.81 6.71
147857 8.78 2 1 148.0 205.5 86.0 40.5 13.68 14.71 72.37 108.41 15.12
147859 6.14 2 1 127.5 201.5 73.5 59.5 15.54 18.22 66.77 185.68 22.01
158001 5.02 1 1 109.5 182.5 86.5 56.0 17.16 20.92 64.05 62.69 18.42
158026 6.00 2 1 114.0 176.0 58.0 50.0 11.19 35.90 53.04 172.95 7.59
158030 6.48 1 2 148.0 230.5 69.0 68.5 12.90 31.57 56.94 125.87 6.20
158040 5.95 1 2 113.0 180.0 38.0 59.0 13.88 30.71 58.36 149.75 14.89
158051 4.67 1 2 116.5 198.5 65.0 69.0 20.72 28.39 51.09 162.98 8.51
158132 4.57 2 2 126.5 205.0 77.0 63.0 13.76 48.11 39.38 313.43 13.01
158134 6.72 2 2 160.5 228.0 65.5 54.5 13.44 33.78 53.80 167.20 7.89
158141 9.44 2 2 145.0 214.0 59.0 57.0 16.26 21.71 62.40 105.73 8.51
158151 4.10 1 1 111.0 177.0 50.5 56.0 16.85 39.33 46.77 175.91 17.89
158179 9.19 1 2 116.0 183.0 73.0 52.5 15.14 27.84 57.65 115.61 12.77
158199 7.56 1 1 132.5 193.5 94.0 42.0 18.09 42.78 39.50 366.43 15.79
158202 4.45 1 1 121.0 174.5 66.5 40.0 15.04 40.28 47.47 145.87 17.88
158211 6.12 2 1 121.5 205.0 47.0 74.0 12.05 33.73 54.66 85.99 6.17
158216 6.32 1 1 124.5 209.0 78.5 69.0 10.09 24.37 67.28 39.00 6.62
158221 6.09 1 1 107.0 183.5 55.5 65.5 24.18 29.29 45.94 278.20 8.60
158229 5.11 2 1 126.0 189.5 80.0 47.5 9.89 27.52 63.47 219.26 12.94
158233 6.12 1 2 140.0 212.0 91.0 53.5 21.69 35.23 42.48 121.64 13.33
158254 7.11 1 1 150.0 210.5 43.0 51.5 10.78 31.79 58.40 105.69 12.81
158257 9.59 1 2 118.5 189.5 75.5 56.0 18.02 34.85 47.15 226.31 10.91
158259 5.75 1 1 107.0 177.5 56.5 59.0 11.16 18.73 71.06 27.51 7.47
158289 9.81 1 2 126.0 210.5 61.5 72.0 7.07 12.44 81.89 11.85 4.97
158293 6.05 1 1 107.0 184.5 105.5 56.0 14.23 31.99 54.37 78.99 8.97
158294 8.66 2 1 115.0 181.0 65.5 53.0 13.00 36.62 52.21 185.80 12.61
158300 7.61 2 2 113.5 186.5 67.5 59.5 16.51 33.60 51.82 135.89 10.47
158302 5.78 2 1 118.0 188.5 119.0 46.5 15.60 38.08 46.93 274.38 8.47
158307 4.12 2 1 123.0 188.5 115.0 42.5 10.97 27.30 63.34 47.46 7.77
158317 5.10 1 1 118.0 169.5 69.5 37.5 12.73 28.86 61.66 193.88 16.44
158338 6.10 2 1 123.5 179.0 60.0 43.5 17.18 28.20 54.92 87.68 10.22
158349 8.15 2 1 136.0 209.0 48.0 63.5 15.78 29.53 54.20 134.41 7.37
158361 8.04 2 2 158.0 217.5 101.0 39.5 13.71 12.72 75.61 23.77 15.13
158363 8.10 1 6 147.5 222.0 70.0 60.5 16.66 29.04 56.24 59.67 10.25
158372 7.22 2 1 162.0 230.0 67.0 54.5 21.07 29.37 49.44 615.29 10.87
158375 7.08 2 1 132.0 195.5 120.5 39.5 10.47 30.60 60.21 92.17 11.12
158386 8.42 2 2 113.5 171.5 41.5 49.5 20.60 28.47 49.28 123.36 3.58
158406 4.14 1 1 160.0 240.0 93.0 61.5 14.61 28.70 57.79 105.16 4.98
158411 6.12 1 1 114.5 170.0 74.5 40.5 9.80 17.41 77.02 43.15 21.44
158415 9.37 2 2 132.5 194.0 57.5 50.0 18.88 19.24 62.83 104.57 22.13
158416 4.04 2 1 162.0 225.5 89.5 45.5 11.03 25.30 65.06 65.35 6.22
158420 9.40 1 1 137.5 223.5 83.0 69.0 12.87 36.79 51.18 175.27 17.18
158429 6.11 1 1 111.0 175.5 56.0 53.5 16.79 30.01 54.94 151.83 9.23
158436 4.13 1 2 120.5 187.0 68.0 53.0 7.58 26.82 66.27 128.57 5.66
158439 8.12 2 2 161.0 249.5 61.5 76.0 12.67 31.96 56.42 257.38 15.70
158447 8.53 1 2 118.5 203.5 86.0 67.5 15.23 32.52 54.17 298.90 9.57
158454 6.70 2 4 111.5 207.5 208.5 54.5 12.40 21.95 65.20 143.48 7.09
158468 5.06 2 1 122.5 191.5 94.5 50.0 11.51 39.97 50.51 94.62 9.76
158470 8.05 1 1 134.0 202.5 114.0 46.0 9.63 21.37 68.96 109.53 7.70
158488 6.82 2 1 146.5 209.5 50.0 53.0 12.71 36.32 53.53 54.13 11.44
169014 8.34 2 1 161.0 224.5 125.5 38.0 8.25 15.39 78.38 60.41 15.42
169023 9.65 2 1 130.0 195.5 111.0 43.0 15.35 27.80 57.37 206.84 25.24
169027 6.82 2 1 154.5 219.5 99.5 45.0 8.46 35.41 56.92 75.16 9.60
169036 6.07 1 1 124.5 186.5 79.5 46.0 16.16 26.55 59.61 276.44 12.21
169045 5.80 2 1 143.0 213.0 49.5 60.0 11.12 24.46 66.01 149.30 12.92
169062 9.49 1 1 140.0 205.5 56.0 54.0 11.33 40.05 49.74 176.98 13.14
169109 9.80 2 1 137.5 212.5 64.5 62.0 13.02 41.82 47.32 250.60 18.09
169112 6.10 2 1 121.0 202.5 54.5 70.5 13.81 37.23 48.78 251.35 9.39
169122 8.44 2 1 131.5 197.5 78.5 50.0 11.98 18.02 70.20 75.12 10.52
169162 8.10 1 1 129.5 195.5 57.0 55.0 15.91 31.20 52.94 266.60 18.18
169178 6.23 2 1 160.0 217.5 70.5 43.5 13.90 23.21 65.30 130.53 25.97
169241 5.48 1 1 144.5 222.0 66.5 64.5 14.92 43.64 43.66 117.47 9.65
169253 9.04 2 1 117.5 178.5 135.5 34.0 14.92 38.41 47.69 261.39 4.80
169261 5.90 2 1 163.5 226.0 67.0 49.0 13.19 37.05 50.04 194.02 10.83
169291 8.96 1 1 123.0 198.5 79.5 59.5 10.98 33.86 56.26 111.71 4.34
169292 6.07 2 1 138.0 199.5 130.0 35.5 6.88 23.77 72.60 52.94 13.07
169299 5.69 2 1 137.0 195.0 51.0 47.5 7.75 30.57 62.37 167.27 14.29
169360 5.25 1 1 111.0 188.0 170.0 43.0 13.47 24.36 63.23 86.49 11.72
169432 4.95 2 1 127.0 194.5 91.5 49.0 9.28 27.13 67.18 35.69 14.83
179503 7.34 2 1 124.0 193.5 94.0 50.5 8.68 13.61 79.53 23.77 13.89
179513 7.18 1 1 111.5 178.0 59.5 54.5 10.65 23.88 65.95 59.76 7.37
179554 5.48 1 1 120.0 184.0 81.5 48.0 17.93 36.50 45.63 364.49 6.92
179619 6.67 2 1 163.5 229.5 91.5 48.0 18.99 26.37 54.35 201.42 13.77
179653 5.19 2 1 119.0 190.0 157.5 39.5 13.78 21.32 64.95 111.49 2.71
179656 4.08 1 1 130.5 192.5 151.5 31.5 12.37 39.09 49.96 116.47 6.37
179666 7.78 1 1 124.0 194.5 72.0 56.0 14.26 21.72 64.97 56.43 5.64
179671 5.19 1 1 123.0 192.0 84.0 52.5 15.95 27.66 58.24 111.86 7.27
179680 5.10 2 1 145.5 214.0 102.5 48.0 11.27 22.71 67.88 72.64 6.51
179693 4.13 1 1 150.0 221.0 57.0 59.5 25.68 18.71 58.05 143.61 13.19
179704 7.18 2 1 114.5 180.0 59.0 53.5 7.64 35.64 59.43 144.80 13.32
179716 7.19 1 1 121.0 178.0 82.0 40.5 15.61 25.95 60.01 121.71 22.09
179727 4.09 2 1 120.0 196.5 111.5 54.0 21.96 21.11 58.37 129.20 10.04
179732 4.17 2 1 112.0 173.5 86.5 44.0 11.94 25.53 63.52 142.53 10.33
179742 4.08 2 1 121.5 182.0 54.5 49.5 13.25 28.87 60.17 136.71 9.70
179812 8.01 1 1 107.0 160.0 68.0 39.5 16.47 31.78 51.27 302.88 15.43
179822 4.15 1 1 149.0 208.0 51.5 49.0 15.82 32.02 53.28 155.55 7.55
179838 8.19 1 1 120.0 183.0 62.0 50.5 13.12 39.19 49.04 78.23 10.91
179845 4.13 2 1 127.5 183.5 109.0 34.5 11.39 21.19 70.06 36.19 8.38
179847 4.09 2 1 115.0 170.0 64.5 42.0 12.13 19.28 69.29 136.90 17.14
179872 4.74 1 1 120.5 232.5 61.0 99.5 7.49 29.39 64.55 73.60 5.80
179907 6.70 1 1 147.5 226.0 162.5 46.0 10.63 35.55 54.62 71.23 7.64
179920 4.10 1 1 116.0 174.5 79.5 43.0 13.86 30.20 59.11 164.04 21.88
179938 4.28 1 1 118.0 174.5 78.0 41.0 9.88 30.21 62.22 75.63 11.56
179977 4.39 2 1 126.5 191.0 75.0 49.5 17.13 35.87 48.73 125.17 11.01
179980 4.04 1 1 113.5 179.5 147.0 37.0 12.48 31.17 57.95 93.14 5.27
;
run;
proc print data=pcat_baseline (obs=36);
id subjno age sex race;
var ldl totchol triglyc hdl calprot calfat calcarb dchol dfiber;
title "The PCAT Study";
title2 "Data Listing of the Baseline Measurements";
run;
proc freq data=pcat_baseline;
table sex*race;
title2 "Frequency Table of Sex by Race";
run;
proc means data=pcat_baseline;
var age ldl totchol triglyc hdl calprot calfat calcarb dchol dfiber;
title2 "Descriptive Statistics of the Continuous Variables at Baseline";
run;
proc sort data=pcat_baseline out=pcat_baseline2;
by sex;
run;
proc means data=pcat_baseline2;
by sex;
var age ldl totchol triglyc hdl calprot calfat calcarb dchol dfiber;
title2 "Descriptive Statistics of the Continuous Variables at Baseline by Sex";
run;
proc gplot data=pcat_baseline2;
plot ldl*sex/vaxis=axis1 haxis=axis2 nolegend frame;
axis1 label=(a=90 'LDL Cholesterol');
axis2 offset=(20) label=('Sex') minor=none major=(number=2);
symbol value=x color=black;
title2 "Scatterplot of LDL Cholesterol by Sex";
run;
proc gplot data=pcat_baseline2;
plot ldl*sex/vaxis=axis1 haxis=axis2 nolegend frame;
axis1 label=(a=90 'LDL Cholesterol');
axis2 offset=(20) label=('Sex') minor=none major=(number=2);
symbol interpol=box color=black;
title2 "Box Plots of LDL Cholesterol for Each Sex";
run;
data pcat_baseline3;
set pcat_baseline;
white=0;
female=sex-1;
label white="Caucasian"
female="Female";
if race=1 then white=1;
run;
proc reg data=pcat_baseline3;
model ldl=age white female calprot calfat calcarb dchol dfiber;
run;
Tershakovec et al (PCAT (AJPH 1998).pdf). American Journal of Public Health 1998; 88: 258-261) conducted a trial in which hypercholesterolemic children were randomized to three different nutritional educational groups:
- parent-child autotutorial (PCAT);
- counseling;
- control.
The primary outcome was LDL cholesterol and it was assessed at 0 (baseline), 3, 6, and 12 months.
A multiple regression model was applied to determine whether demographic and nutritional intake variables were predictive of LDL cholesterol at baseline. Run this program. Look at the regression output. Do you see only one statistically significant predictor? Female status (p = 0.0004). Now look at the output for the means and the scatterplot of LDL by Sex. Do you see mean LDL among females that is 6.2 mg/dL greater than the male average LDL?
Example 1.2 (ANCOVA) Download the SAS code: ANCOVA.sas
The longitudinal data from the one-year follow-up are provided but not analyzed (beyond the scope of this course).
*******************************************************************************************
* The following data set is taken from the PCAT (Parent-Child Auto-Tutorial) Study: *
* Tershakovec AM, Shannon BM, Achterberg CL, McKenzie JM, Martel JK, *
* Smiciklas-Wright H, Pammer SE, Cortner JA. (1998). One-year follow-up *
* of nutrition education for hypercholesterolemic children. American Journal of *
* Public Health 88, 258-261. *
* *
* This data set consists of repeated measurements on 261 of the participants. *
*******************************************************************************************;
proc format;
value sexfmt 1='Male' 2='Female';
value racefmt 1='White' 2='Black' 3='Oriental' 4='Iranian' 5='Indian' 6='Hispanic';
value tgrpfmt 0='PCAT' 1='Counseling' 2='Control';
run;
data pcat_longitud;
input subjno age sex race trtgroup period ldl totchol triglyc hdl
calprot calfat calcarb dchol dfiber;
label subjno ='Subject #'
age ='Age'
race ='Race'
trtgroup='Treatment Group'
period ='Period (months)'
ldl ='LDL Cholesterol (mg/dL)'
totchol ='Total Cholesterol (mg/dL)'
triglyc ='Triglycerides (mg/dL)'
hdl ='HDL Cholesterol (mg/dL)'
calprot ='% Calories from Protein'
calfat ='% Calories from Fat'
calcarb ='% Calories from Carbohydrates'
dchol ='Dietary Cholesterol'
dfiber ='Dietary Fiber';
cards;
110013 8.23 1 1 109.5 181.0 120.5 47.5 13.80 24.09 62.54 303.95 14.30
110019 9.27 2 1 117.0 191.0 117.0 50.5 21.70 34.65 43.19 115.82 4.66
110042 4.26 1 1 123.5 188.5 111.0 42.5 8.55 32.81 61.45 53.56 8.81
110067 5.75 2 1 117.5 185.5 69.0 54.5 13.95 23.06 64.55 100.15 14.79
110109 5.57 2 1 123.0 184.5 90.0 43.5 12.56 24.80 63.95 67.15 7.63
110110 8.53 1 1 112.0 163.5 58.5 39.5 15.66 27.24 59.67 120.76 16.23
110115 5.59 1 1 118.5 180.0 59.0 50.0 11.69 33.12 57.20 575.64 10.10
110118 4.88 2 1 144.0 207.0 81.0 46.5 11.29 20.45 68.71 53.94 11.87
110120 6.74 2 1 135.5 206.5 74.5 56.0 13.15 30.40 55.74 102.22 6.42
110123 8.55 2 2 127.5 192.5 66.5 51.5 11.41 48.41 40.44 135.20 8.15
110135 9.18 2 1 132.5 201.0 47.0 59.0 14.42 25.45 62.04 113.81 14.23
110149 9.83 1 1 114.0 190.5 77.0 61.0 12.72 35.81 53.01 85.73 8.31
110167 6.30 1 1 119.5 194.5 51.5 64.5 12.28 24.26 64.31 133.50 14.26
110232 8.63 2 1 115.0 192.0 153.5 46.0 9.66 25.60 64.47 49.06 6.97
110239 9.48 2 2 127.5 205.0 59.0 66.0 7.39 40.07 53.19 333.29 15.97
110244 5.51 2 1 138.5 213.5 66.5 61.5 11.63 40.38 48.99 311.83 12.29
110254 5.87 1 1 109.0 170.0 72.0 47.0 9.70 24.06 68.47 81.75 16.20
110261 8.13 2 1 154.0 213.5 93.5 40.5 11.20 25.51 64.66 139.45 11.46
110270 4.03 1 1 110.0 173.0 70.0 49.0 12.71 16.59 71.09 74.02 12.29
110678 6.20 2 1 133.5 190.5 81.0 41.0 11.53 40.57 48.67 95.80 8.69
111001 9.45 1 1 116.0 188.0 48.0 62.5 22.26 42.53 35.36 298.24 12.89
111003 8.11 1 1 112.0 183.0 59.0 59.0 9.80 24.16 68.33 65.52 11.57
111005 7.93 2 1 133.5 193.5 53.5 49.5 13.85 44.73 42.78 535.55 9.56
111014 7.06 1 1 127.0 193.0 61.5 53.5 10.70 28.73 63.20 89.92 14.34
111019 4.53 1 1 133.0 191.0 91.0 40.0 12.75 22.53 68.10 88.55 12.41
111025 6.95 1 1 111.0 186.0 75.5 60.0 12.64 26.02 61.65 76.90 5.45
111036 6.24 2 1 119.0 188.0 103.0 48.5 9.35 23.74 68.84 182.52 10.96
111071 9.42 1 1 118.0 189.5 73.5 57.0 7.93 20.30 74.66 20.85 4.46
122063 4.31 1 1 110.0 184.5 155.0 43.0 15.74 47.75 40.19 162.17 18.81
122088 8.31 2 1 144.5 235.0 54.5 79.5 14.23 46.41 40.48 101.10 5.10
122095 4.21 2 1 131.0 196.0 54.5 54.0 15.10 36.90 48.49 473.76 3.60
122117 7.35 2 1 120.5 181.0 58.5 48.5 11.79 37.47 51.69 240.19 7.54
122154 8.04 2 1 135.0 210.0 99.0 55.5 18.23 26.92 56.75 168.26 18.77
122158 8.13 1 1 124.0 193.5 78.5 54.0 13.24 22.96 67.35 48.36 12.23
122172 4.79 2 2 113.0 194.0 76.5 65.5 19.52 34.96 47.98 166.31 10.08
122206 7.21 2 1 126.5 191.0 82.0 48.0 12.17 36.17 51.79 115.30 5.50
122223 4.15 1 1 109.0 173.5 49.5 54.5 23.63 36.68 41.36 359.73 7.04
122231 4.11 2 1 150.5 221.5 152.0 40.5 11.80 32.68 57.49 79.33 8.32
122246 7.39 1 1 118.5 189.5 58.0 59.5 17.08 24.34 58.90 137.09 11.74
122251 8.27 1 1 114.5 193.0 50.0 68.5 9.77 33.73 57.70 181.32 5.30
122307 7.13 1 1 107.5 199.0 53.0 80.5 10.59 27.77 63.69 125.21 7.12
122309 9.20 2 1 148.5 214.0 97.5 46.0 13.76 41.66 45.59 177.87 14.87
122318 5.08 1 1 135.0 198.0 79.0 47.5 11.26 36.51 52.36 88.12 7.31
122330 7.05 2 1 124.0 189.5 82.5 49.0 8.81 15.78 75.07 102.98 9.52
122356 9.08 2 1 137.0 204.0 57.0 55.5 17.68 28.61 54.06 211.09 10.27
122386 6.82 1 1 149.5 218.0 81.0 52.5 12.64 34.25 56.38 52.99 8.65
122397 4.16 1 2 141.0 203.5 64.5 49.5 10.16 23.13 68.46 64.56 18.91
122401 6.35 2 1 125.5 191.0 93.5 47.0 11.23 31.46 61.32 56.34 15.64
122404 4.30 1 1 140.0 206.0 65.5 53.0 18.99 33.77 48.58 140.24 8.99
122416 8.79 1 2 120.0 186.5 103.0 46.0 13.02 35.01 54.02 86.44 7.51
122421 8.30 2 2 133.0 181.5 42.0 40.5 15.85 49.61 38.86 96.55 16.81
122426 4.10 2 1 121.0 176.5 79.5 39.5 18.37 45.77 35.64 378.38 5.82
122444 6.51 1 1 119.0 187.5 112.0 46.0 13.59 29.36 56.94 171.98 8.97
122495 8.78 1 1 110.0 186.0 49.0 66.0 10.19 34.77 56.00 119.14 7.30
122514 3.95 1 2 140.0 207.5 64.0 54.5 18.32 31.82 49.16 105.02 6.13
122516 8.35 1 1 137.5 215.0 66.5 64.5 12.91 36.71 51.40 62.40 6.84
135016 6.32 1 1 115.5 185.5 91.0 51.5 15.29 32.69 54.84 94.89 11.72
135017 9.46 1 1 118.5 203.0 123.5 59.5 16.55 32.57 51.58 174.98 8.08
135027 5.05 1 1 119.0 184.0 80.5 48.5 19.70 41.19 39.14 217.69 2.10
135046 4.24 1 1 126.0 196.0 121.5 46.0 6.45 7.77 88.67 12.64 7.22
135054 4.04 1 1 133.5 189.0 50.5 45.0 17.28 31.41 49.97 99.51 5.05
135060 4.05 2 1 123.0 188.0 187.5 27.5 16.88 29.10 56.40 81.52 5.60
135066 4.08 1 1 115.0 183.5 96.5 49.5 12.91 27.29 59.81 75.23 4.32
135068 4.04 1 1 150.0 221.0 92.5 52.5 11.01 13.08 78.93 86.39 8.17
135086 4.22 1 1 146.5 212.0 138.5 38.0 10.54 15.51 74.78 68.20 4.78
135098 5.49 1 1 145.5 205.5 59.5 48.0 11.46 16.67 75.12 79.33 20.95
135104 5.14 2 1 119.5 183.5 68.5 50.5 14.95 17.98 69.91 80.49 20.10
135111 4.05 2 1 130.0 188.5 79.5 43.0 16.09 42.00 42.74 130.70 4.42
135124 4.19 2 1 125.0 182.5 65.0 44.5 12.53 38.73 49.91 70.44 6.23
135133 5.16 1 1 132.0 177.0 86.0 37.0 12.66 9.90 79.41 39.64 9.15
135148 6.84 1 1 124.5 185.5 98.5 41.5 12.50 26.11 60.88 118.63 7.57
135173 6.72 2 1 114.0 173.5 60.5 47.5 11.48 22.26 66.73 267.20 19.07
135175 7.05 2 1 122.0 184.0 45.5 52.5 9.14 25.24 65.97 400.31 3.67
135209 4.31 1 1 135.0 187.0 54.5 41.0 17.45 27.18 54.79 279.43 12.65
135238 5.29 2 1 124.5 191.5 114.5 44.0 9.18 30.75 64.31 59.25 13.23
135268 4.67 1 1 124.0 199.5 110.5 53.5 10.27 27.81 64.14 152.16 10.58
135287 4.06 1 1 116.0 176.5 72.0 46.0 13.68 26.30 60.46 116.63 5.97
135289 4.48 1 5 149.0 219.5 99.0 50.5 14.01 33.33 52.97 116.03 2.44
135336 4.03 1 1 148.5 207.5 114.5 36.0 11.98 27.69 61.14 139.23 6.38
135338 4.24 2 1 161.0 231.0 93.0 51.5 13.32 14.45 76.49 20.31 9.79
135342 9.68 1 2 127.0 201.5 90.5 56.5 15.42 35.50 49.18 498.45 14.87
135344 9.88 2 1 119.0 191.0 76.0 57.0 13.06 36.32 52.17 103.29 10.45
135351 4.19 1 1 120.0 194.5 53.5 63.5 10.69 36.33 55.32 171.86 8.52
135390 7.40 2 1 113.5 170.5 98.0 37.5 14.66 39.26 46.21 374.73 16.89
135395 6.10 1 1 109.0 173.0 47.5 54.5 9.81 31.58 59.32 76.99 13.24
135606 6.05 2 1 140.5 210.5 133.5 43.5 11.59 29.36 59.58 187.12 6.30
135624 5.57 2 4 130.5 191.5 69.0 47.0 11.03 34.76 56.39 179.55 20.67
135629 4.19 2 1 133.0 219.5 89.0 69.0 13.20 23.93 64.66 71.01 10.44
135631 6.04 2 1 121.0 193.0 61.0 60.0 11.04 35.66 54.68 223.41 14.31
135635 4.03 1 6 111.5 170.5 69.0 45.0 14.51 25.96 61.90 125.04 20.65
135663 8.97 1 1 122.0 202.5 57.0 69.0 20.64 37.84 41.84 187.55 13.89
135669 7.10 2 1 125.0 185.5 78.5 44.5 17.15 37.20 45.22 267.85 10.79
135676 4.05 1 6 119.5 201.5 45.5 72.5 9.66 19.84 72.22 52.73 16.19
135682 4.23 2 1 137.5 194.0 77.5 41.0 11.29 29.69 60.89 41.17 5.01
135685 4.54 2 1 131.5 205.5 114.0 51.5 12.01 31.29 57.68 85.50 8.28
135704 4.01 2 1 123.0 184.5 68.5 48.0 16.22 21.51 63.89 43.84 11.26
146506 6.29 2 1 111.5 175.5 99.5 44.5 16.21 37.95 47.06 209.94 10.78
146507 9.41 2 1 129.5 192.0 92.5 44.0 18.19 47.71 33.80 401.57 2.17
146520 8.17 2 1 118.5 181.0 61.5 50.0 13.60 35.95 52.08 221.82 14.54
146525 7.47 2 1 136.0 205.5 56.0 58.0 13.38 34.97 53.34 170.45 15.98
146527 7.47 1 1 117.5 196.5 51.5 68.5 20.58 40.13 39.44 766.00 11.73
146544 5.40 1 1 144.5 206.0 83.0 45.0 14.66 29.38 56.40 224.47 11.16
146564 6.06 1 1 121.0 201.0 67.5 66.5 9.48 33.66 59.53 129.10 13.10
146576 7.03 1 1 120.5 183.0 79.0 46.5 9.18 29.49 61.81 95.21 11.45
146603 7.93 2 1 120.5 193.5 98.0 53.0 13.02 26.19 64.61 92.88 15.69
146611 6.17 2 1 154.5 232.5 58.5 66.5 15.51 39.54 45.09 116.91 4.05
146682 5.06 1 1 136.0 201.5 97.5 46.0 13.51 25.73 60.62 80.42 4.97
146703 8.11 1 1 124.5 195.5 68.5 57.5 17.54 25.60 56.64 123.25 8.94
146720 5.25 2 1 114.5 176.0 143.0 33.0 12.56 29.28 58.22 75.82 7.69
146736 5.57 1 1 111.5 183.0 168.5 38.0 9.58 29.11 64.33 111.66 13.55
146773 5.13 1 1 109.5 167.5 56.0 47.0 15.26 28.22 57.10 100.64 7.10
146775 5.05 1 1 161.0 224.0 137.0 35.5 11.35 38.17 50.17 102.68 12.97
146790 8.19 2 1 153.5 223.0 88.5 52.0 21.21 44.14 34.37 404.68 13.26
146807 4.06 2 1 134.5 210.0 43.0 67.0 19.79 33.21 48.01 186.39 11.29
146808 4.14 2 1 111.5 176.0 51.5 54.0 13.02 31.37 56.57 173.18 5.49
146814 9.51 2 1 130.0 193.0 82.5 46.5 19.04 26.64 54.50 160.76 14.43
146829 5.36 1 1 142.5 201.0 100.0 38.5 16.47 27.75 56.11 299.46 5.87
146841 9.08 2 1 115.5 184.5 89.5 51.0 11.48 32.34 55.68 132.47 7.36
146909 6.89 1 1 110.0 178.0 82.0 51.5 15.93 27.37 57.34 175.16 7.46
146922 8.92 1 1 115.0 183.5 104.5 47.5 10.55 29.30 60.51 239.09 13.01
146932 5.66 2 1 133.5 208.0 99.5 54.5 21.24 28.49 52.56 169.07 14.89
146947 7.06 2 1 127.5 193.0 59.0 54.0 14.43 28.14 60.19 148.20 13.91
146968 8.12 1 1 130.0 206.5 93.5 58.0 17.30 45.48 36.79 212.00 9.27
147261 7.12 2 1 112.0 177.0 45.5 55.5 14.56 32.95 54.48 225.71 27.19
147264 6.12 2 1 145.0 207.5 70.0 48.5 9.89 27.44 65.61 75.28 15.98
147270 4.02 2 1 119.5 174.5 91.5 36.5 10.94 29.38 61.53 78.07 11.11
147293 7.18 2 1 148.0 218.0 105.5 49.0 12.72 27.47 61.20 109.32 19.36
147322 6.08 2 1 155.0 223.5 120.0 44.5 10.49 39.78 51.29 140.86 15.40
147348 6.59 1 1 113.5 182.5 70.5 55.0 11.91 39.25 51.24 276.64 12.54
147386 6.99 2 1 115.0 185.0 117.0 46.5 14.14 29.55 59.49 140.65 10.89
147387 5.00 2 1 113.0 188.0 127.5 49.5 13.59 40.88 45.90 91.74 6.20
147390 6.06 2 1 136.0 203.5 54.5 57.0 14.31 26.25 61.87 164.92 13.52
147401 6.13 2 1 121.5 182.5 68.0 47.5 16.41 19.32 65.97 66.17 8.55
147430 8.28 1 1 110.5 177.5 95.0 48.0 13.72 31.41 56.80 168.54 21.61
147445 5.70 2 1 129.5 188.5 114.0 36.5 12.80 25.07 64.45 59.39 6.82
147463 4.94 1 1 107.5 167.5 130.5 34.0 12.52 31.74 56.41 127.56 13.94
147464 9.10 2 1 163.0 231.5 85.5 51.0 13.79 39.04 47.90 140.70 8.22
147468 6.21 2 1 125.0 205.5 66.0 67.0 10.36 24.96 66.46 50.67 4.87
147488 5.14 2 1 117.0 184.0 95.5 48.0 13.19 29.52 57.85 56.70 6.19
147494 7.15 1 1 132.0 195.0 84.0 46.0 12.18 21.84 68.03 302.15 8.97
147495 8.08 2 1 111.5 176.5 68.5 51.5 12.23 16.83 73.67 61.03 14.89
147498 4.12 1 1 118.5 178.5 49.5 50.0 9.70 26.29 62.84 66.10 7.26
147516 8.14 1 1 108.5 183.0 127.5 49.0 12.84 25.18 63.38 180.46 12.68
147523 7.10 1 1 151.0 203.5 101.5 32.0 11.89 27.75 62.53 107.05 21.57
147532 7.07 1 1 125.5 191.0 85.5 48.0 13.59 30.65 56.39 111.08 6.80
147538 9.72 2 1 121.0 193.5 133.0 46.0 15.68 39.93 44.19 260.40 14.81
147540 8.08 2 1 135.0 197.5 80.0 46.5 18.82 42.05 39.51 426.24 10.45
147704 4.07 2 1 126.0 208.5 97.5 63.0 17.53 17.79 66.57 78.19 7.95
147706 5.87 1 1 111.0 181.0 67.5 56.5 12.65 30.81 56.62 104.33 4.37
147709 6.13 1 1 151.5 223.0 62.5 59.0 18.08 41.60 42.68 607.51 12.06
147714 8.53 1 1 138.0 211.5 99.5 53.5 13.10 22.10 65.12 79.57 13.53
147715 4.03 1 1 123.5 192.5 76.0 54.0 11.25 36.22 53.85 115.58 13.70
147726 6.37 1 1 109.5 169.5 58.5 48.5 13.54 28.69 58.36 175.52 12.80
147730 6.07 2 1 113.0 187.5 83.0 58.0 11.55 32.94 58.47 252.49 27.43
147742 8.45 2 1 135.5 210.0 101.5 54.0 15.37 13.56 72.00 127.71 12.62
147748 4.98 1 1 118.5 192.0 162.5 41.0 9.91 10.49 81.58 15.11 6.35
147769 7.16 1 1 112.5 176.0 82.5 47.0 13.96 28.41 59.64 549.35 4.67
147779 4.05 2 6 135.0 205.5 79.0 55.0 18.17 20.73 62.61 234.87 22.57
147791 4.26 2 1 113.5 180.0 99.0 46.5 13.31 28.02 64.42 11.46 13.58
147794 6.83 1 3 123.5 205.0 55.5 70.5 14.74 41.11 45.26 101.13 5.74
147808 5.04 2 1 124.0 182.0 91.5 38.5 16.91 11.79 73.26 49.52 17.38
147825 4.69 1 1 118.5 197.0 155.5 47.5 8.19 16.33 76.62 40.60 6.14
147829 6.26 1 1 130.5 198.5 49.5 58.0 13.74 22.47 65.10 62.85 8.94
147833 9.88 1 1 136.0 198.5 106.0 41.5 12.75 26.37 60.70 173.08 10.63
147839 5.03 2 1 156.5 228.5 164.0 39.5 17.64 21.59 61.37 142.86 9.94
147848 4.07 1 2 139.5 205.0 63.5 52.5 16.99 29.00 55.02 88.40 3.57
147852 8.10 1 1 116.0 183.0 54.0 56.0 12.45 37.81 51.15 230.81 6.71
147857 8.78 2 1 148.0 205.5 86.0 40.5 13.68 14.71 72.37 108.41 15.12
147859 6.14 2 1 127.5 201.5 73.5 59.5 15.54 18.22 66.77 185.68 22.01
158001 5.02 1 1 109.5 182.5 86.5 56.0 17.16 20.92 64.05 62.69 18.42
158026 6.00 2 1 114.0 176.0 58.0 50.0 11.19 35.90 53.04 172.95 7.59
158030 6.48 1 2 148.0 230.5 69.0 68.5 12.90 31.57 56.94 125.87 6.20
158040 5.95 1 2 113.0 180.0 38.0 59.0 13.88 30.71 58.36 149.75 14.89
158051 4.67 1 2 116.5 198.5 65.0 69.0 20.72 28.39 51.09 162.98 8.51
158132 4.57 2 2 126.5 205.0 77.0 63.0 13.76 48.11 39.38 313.43 13.01
158134 6.72 2 2 160.5 228.0 65.5 54.5 13.44 33.78 53.80 167.20 7.89
158141 9.44 2 2 145.0 214.0 59.0 57.0 16.26 21.71 62.40 105.73 8.51
158151 4.10 1 1 111.0 177.0 50.5 56.0 16.85 39.33 46.77 175.91 17.89
158179 9.19 1 2 116.0 183.0 73.0 52.5 15.14 27.84 57.65 115.61 12.77
158199 7.56 1 1 132.5 193.5 94.0 42.0 18.09 42.78 39.50 366.43 15.79
158202 4.45 1 1 121.0 174.5 66.5 40.0 15.04 40.28 47.47 145.87 17.88
158211 6.12 2 1 121.5 205.0 47.0 74.0 12.05 33.73 54.66 85.99 6.17
158216 6.32 1 1 124.5 209.0 78.5 69.0 10.09 24.37 67.28 39.00 6.62
158221 6.09 1 1 107.0 183.5 55.5 65.5 24.18 29.29 45.94 278.20 8.60
158229 5.11 2 1 126.0 189.5 80.0 47.5 9.89 27.52 63.47 219.26 12.94
158233 6.12 1 2 140.0 212.0 91.0 53.5 21.69 35.23 42.48 121.64 13.33
158254 7.11 1 1 150.0 210.5 43.0 51.5 10.78 31.79 58.40 105.69 12.81
158257 9.59 1 2 118.5 189.5 75.5 56.0 18.02 34.85 47.15 226.31 10.91
158259 5.75 1 1 107.0 177.5 56.5 59.0 11.16 18.73 71.06 27.51 7.47
158289 9.81 1 2 126.0 210.5 61.5 72.0 7.07 12.44 81.89 11.85 4.97
158293 6.05 1 1 107.0 184.5 105.5 56.0 14.23 31.99 54.37 78.99 8.97
158294 8.66 2 1 115.0 181.0 65.5 53.0 13.00 36.62 52.21 185.80 12.61
158300 7.61 2 2 113.5 186.5 67.5 59.5 16.51 33.60 51.82 135.89 10.47
158302 5.78 2 1 118.0 188.5 119.0 46.5 15.60 38.08 46.93 274.38 8.47
158307 4.12 2 1 123.0 188.5 115.0 42.5 10.97 27.30 63.34 47.46 7.77
158317 5.10 1 1 118.0 169.5 69.5 37.5 12.73 28.86 61.66 193.88 16.44
158338 6.10 2 1 123.5 179.0 60.0 43.5 17.18 28.20 54.92 87.68 10.22
158349 8.15 2 1 136.0 209.0 48.0 63.5 15.78 29.53 54.20 134.41 7.37
158361 8.04 2 2 158.0 217.5 101.0 39.5 13.71 12.72 75.61 23.77 15.13
158363 8.10 1 6 147.5 222.0 70.0 60.5 16.66 29.04 56.24 59.67 10.25
158372 7.22 2 1 162.0 230.0 67.0 54.5 21.07 29.37 49.44 615.29 10.87
158375 7.08 2 1 132.0 195.5 120.5 39.5 10.47 30.60 60.21 92.17 11.12
158386 8.42 2 2 113.5 171.5 41.5 49.5 20.60 28.47 49.28 123.36 3.58
158406 4.14 1 1 160.0 240.0 93.0 61.5 14.61 28.70 57.79 105.16 4.98
158411 6.12 1 1 114.5 170.0 74.5 40.5 9.80 17.41 77.02 43.15 21.44
158415 9.37 2 2 132.5 194.0 57.5 50.0 18.88 19.24 62.83 104.57 22.13
158416 4.04 2 1 162.0 225.5 89.5 45.5 11.03 25.30 65.06 65.35 6.22
158420 9.40 1 1 137.5 223.5 83.0 69.0 12.87 36.79 51.18 175.27 17.18
158429 6.11 1 1 111.0 175.5 56.0 53.5 16.79 30.01 54.94 151.83 9.23
158436 4.13 1 2 120.5 187.0 68.0 53.0 7.58 26.82 66.27 128.57 5.66
158439 8.12 2 2 161.0 249.5 61.5 76.0 12.67 31.96 56.42 257.38 15.70
158447 8.53 1 2 118.5 203.5 86.0 67.5 15.23 32.52 54.17 298.90 9.57
158454 6.70 2 4 111.5 207.5 208.5 54.5 12.40 21.95 65.20 143.48 7.09
158468 5.06 2 1 122.5 191.5 94.5 50.0 11.51 39.97 50.51 94.62 9.76
158470 8.05 1 1 134.0 202.5 114.0 46.0 9.63 21.37 68.96 109.53 7.70
158488 6.82 2 1 146.5 209.5 50.0 53.0 12.71 36.32 53.53 54.13 11.44
169014 8.34 2 1 161.0 224.5 125.5 38.0 8.25 15.39 78.38 60.41 15.42
169023 9.65 2 1 130.0 195.5 111.0 43.0 15.35 27.80 57.37 206.84 25.24
169027 6.82 2 1 154.5 219.5 99.5 45.0 8.46 35.41 56.92 75.16 9.60
169036 6.07 1 1 124.5 186.5 79.5 46.0 16.16 26.55 59.61 276.44 12.21
169045 5.80 2 1 143.0 213.0 49.5 60.0 11.12 24.46 66.01 149.30 12.92
169062 9.49 1 1 140.0 205.5 56.0 54.0 11.33 40.05 49.74 176.98 13.14
169109 9.80 2 1 137.5 212.5 64.5 62.0 13.02 41.82 47.32 250.60 18.09
169112 6.10 2 1 121.0 202.5 54.5 70.5 13.81 37.23 48.78 251.35 9.39
169122 8.44 2 1 131.5 197.5 78.5 50.0 11.98 18.02 70.20 75.12 10.52
169162 8.10 1 1 129.5 195.5 57.0 55.0 15.91 31.20 52.94 266.60 18.18
169178 6.23 2 1 160.0 217.5 70.5 43.5 13.90 23.21 65.30 130.53 25.97
169241 5.48 1 1 144.5 222.0 66.5 64.5 14.92 43.64 43.66 117.47 9.65
169253 9.04 2 1 117.5 178.5 135.5 34.0 14.92 38.41 47.69 261.39 4.80
169261 5.90 2 1 163.5 226.0 67.0 49.0 13.19 37.05 50.04 194.02 10.83
169291 8.96 1 1 123.0 198.5 79.5 59.5 10.98 33.86 56.26 111.71 4.34
169292 6.07 2 1 138.0 199.5 130.0 35.5 6.88 23.77 72.60 52.94 13.07
169299 5.69 2 1 137.0 195.0 51.0 47.5 7.75 30.57 62.37 167.27 14.29
169360 5.25 1 1 111.0 188.0 170.0 43.0 13.47 24.36 63.23 86.49 11.72
169432 4.95 2 1 127.0 194.5 91.5 49.0 9.28 27.13 67.18 35.69 14.83
179503 7.34 2 1 124.0 193.5 94.0 50.5 8.68 13.61 79.53 23.77 13.89
179513 7.18 1 1 111.5 178.0 59.5 54.5 10.65 23.88 65.95 59.76 7.37
179554 5.48 1 1 120.0 184.0 81.5 48.0 17.93 36.50 45.63 364.49 6.92
179619 6.67 2 1 163.5 229.5 91.5 48.0 18.99 26.37 54.35 201.42 13.77
179653 5.19 2 1 119.0 190.0 157.5 39.5 13.78 21.32 64.95 111.49 2.71
179656 4.08 1 1 130.5 192.5 151.5 31.5 12.37 39.09 49.96 116.47 6.37
179666 7.78 1 1 124.0 194.5 72.0 56.0 14.26 21.72 64.97 56.43 5.64
179671 5.19 1 1 123.0 192.0 84.0 52.5 15.95 27.66 58.24 111.86 7.27
179680 5.10 2 1 145.5 214.0 102.5 48.0 11.27 22.71 67.88 72.64 6.51
179693 4.13 1 1 150.0 221.0 57.0 59.5 25.68 18.71 58.05 143.61 13.19
179704 7.18 2 1 114.5 180.0 59.0 53.5 7.64 35.64 59.43 144.80 13.32
179716 7.19 1 1 121.0 178.0 82.0 40.5 15.61 25.95 60.01 121.71 22.09
179727 4.09 2 1 120.0 196.5 111.5 54.0 21.96 21.11 58.37 129.20 10.04
179732 4.17 2 1 112.0 173.5 86.5 44.0 11.94 25.53 63.52 142.53 10.33
179742 4.08 2 1 121.5 182.0 54.5 49.5 13.25 28.87 60.17 136.71 9.70
179812 8.01 1 1 107.0 160.0 68.0 39.5 16.47 31.78 51.27 302.88 15.43
179822 4.15 1 1 149.0 208.0 51.5 49.0 15.82 32.02 53.28 155.55 7.55
179838 8.19 1 1 120.0 183.0 62.0 50.5 13.12 39.19 49.04 78.23 10.91
179845 4.13 2 1 127.5 183.5 109.0 34.5 11.39 21.19 70.06 36.19 8.38
179847 4.09 2 1 115.0 170.0 64.5 42.0 12.13 19.28 69.29 136.90 17.14
179872 4.74 1 1 120.5 232.5 61.0 99.5 7.49 29.39 64.55 73.60 5.80
179907 6.70 1 1 147.5 226.0 162.5 46.0 10.63 35.55 54.62 71.23 7.64
179920 4.10 1 1 116.0 174.5 79.5 43.0 13.86 30.20 59.11 164.04 21.88
179938 4.28 1 1 118.0 174.5 78.0 41.0 9.88 30.21 62.22 75.63 11.56
179977 4.39 2 1 126.5 191.0 75.0 49.5 17.13 35.87 48.73 125.17 11.01
179980 4.04 1 1 113.5 179.5 147.0 37.0 12.48 31.17 57.95 93.14 5.27
;
run;
Example 1.3 (Repeated Measurements) Download the SAS code: sas_repeated_measurements.sas
Carithers et al (Methylprednisolone therapy in patients with severe alcoholic hepatitis. Annals of Internal Medicine 1989; 110: 685-690) conducted a multi-center, double-blinded, randomized trial in which they compared methylprednisolone to placebo in patients with severe alcoholic hepatitis. Treatment was administered over four weeks. The primary outcome was time to death, and the Kaplan-Meier survival curves and the logrank test indicated that methylprednisolone was superior to placebo.
Secondary outcomes included liver enzymes such as albumin, prothrombin time, bilirubin, and hematocrit. An ANCOVA model was invoked to compare the treatments with respect to bilirubin at week #4 with baseline bilirubin and clinical center as covariates.
Here are a couple of places at the end of the program that you will want to make note of:
*************************************************************************
* This is a program that illustrates the use of PROC GLM in SAS to *
* perform ANCOVA. *
* *
* The data set is taken from the following article: *
* Carithers RL, et al (1989). Methylprednisolone therapy in *
* with severe alcoholic hepatitis. Annals of Internal Medicine 110, *
* 685-690. *
*************************************************************************;
proc format;
value trtfmt 0='Placebo' 1='Methylprednisolone';
run;
data alc_hep;
input subject center treatment albumin0-albumin4 prothrombin0-prothrombin4
bilirubin0-bilirubin4 hematocrit0-hematocrit4 sgot0-sgot4;
format treatment trtfmt.;
cards;
1 1 0 2.4 2.4 1.7 . . 20 18 23 . . 14.3 17.4 17.9 . . 24 23 20 . . 74 99 75 . .
2 1 0 3.8 3.4 3.2 3.1 3.0 16 16 19 19 18 16.1 11.9 12.6 10.4 9.8 34 32 32 31 34 95 68 58 55 65
3 1 0 2.9 2.6 3.3 3.5 3.4 15 13 14 14 14 19.2 11.6 7.5 5.0 3.2 34 30 34 33 33 94 87 142 82 54
4 1 0 2.0 2.1 2.2 2.4 . 22 20 23 17 18 19.4 13.7 8.1 6.1 4.9 30 33 34 36 30 131 115 76 60 59
5 1 0 2.6 2.8 2.7 2.6 2.6 20 20 19 18 18 8.5 8.3 4.9 4.0 4.0 35 30 28 33 35 52 . 49 40 33
6 1 0 1.9 1.9 2.6 2.3 2.4 19 19 17 17 15 9.3 6.4 6.9 6.8 3.0 27 26 33 30 29 49 69 88 101 86
7 1 0 1.9 1.9 2.0 2.1 . 23 22 23 18 . 4.4 3.3 3.7 3.0 . 29 31 31 31 . 39 43 48 45 .
8 1 0 2.4 2.1 . . . 16 16 . . . 24.0 19.1 . . . 24 23 . . . 159 400 . . .
9 1 0 2.2 2.1 2.0 1.9 1.9 18 19 20 22 21 12.3 11.7 10.8 9.8 6.4 27 26 27 27 26 179 156 130 111 94
10 1 0 2.1 . . . . 18 . . . . 28.3 . . . . 30 . . . . 89 . . . .
11 1 0 2.6 2.1 2.4 2.5 2.2 18 16 15 15 15 16.0 10.1 7.8 6.9 5.6 30 24 34 31 28 67 47 . 67 58
12 1 0 2.2 1.9 2.1 2.1 2.4 16 16 16 15 15 25.4 16.9 9.3 5.6 4.2 21 28 32 26 29 55 75 73 59 43
13 1 0 2.6 2.5 1.3 1.8 2.3 18 17 16 16 18 20.2 19.3 14.4 14.3 10.5 22 28 29 26 24 43 53 50 46 34
14 1 0 1.8 3.0 . . . 25 24 31 . . 14.0 15.1 11.4 . . 22 29 15 . . 88 47 . . .
15 1 1 1.9 2.4 2.9 3.0 . 19 15 14 14 . 8.7 2.6 2.3 1.9 . 33 36 41 42 . 135 74 66 48 .
16 1 1 2.0 2.6 3.0 3.6 3.1 18 15 15 15 11 15.6 9.0 5.1 4.4 2.9 30 28 29 33 30 115 68 59 70 63
17 1 1 2.1 2.3 2.8 2.8 2.9 17 16 15 16 16 11.0 8.2 8.4 9.4 8.1 27 21 22 21 25 31 62 56 57 45
18 1 1 2.2 2.0 1.7 1.5 1.4 21 36 34 24 24 16.0 17.8 13.4 10.4 14.2 30 31 29 26 23 170 206 108 76 47
19 1 1 2.1 2.4 2.8 2.6 2.9 16 14 14 14 12 21.7 12.9 7.0 4.1 2.8 23 27 30 34 35 346 414 345 144 104
20 1 1 3.3 . 3.4 3.2 3.0 18 16 15 13 14 35.0 25.6 16.7 10.2 5.4 35 28 27 32 27 48 73 66 45 49
21 1 1 2.5 2.6 2.8 2.8 . 17 14 14 13 . 12.1 6.4 6.0 5.0 . 31 31 34 35 . 399 192 176 219 .
22 1 1 2.6 2.3 2.9 2.8 3.1 17 16 14 14 14 7.9 3.3 3.1 3.3 3.2 33 30 40 39 43 240 74 79 103 89
23 1 1 3.2 2.4 2.1 1.8 1.9 19 19 18 19 24 6.3 10.0 13.4 11.4 17.1 26 20 22 21 34 125 95 288 198 178
24 1 1 3.0 3.5 3.3 3.5 3.9 20 19 17 17 18 4.1 26.6 12.1 10.7 8.4 14 29 30 36 37 47 54 33 44 34
25 1 1 1.7 . . . . 15 . . . . 7.4 . . . . 27 . . . . 144 . . . .
26 1 1 2.7 2.6 . . . 17 21 20 . . 24.3 31.4 20.9 . . 25 28 24 . . 145 285 . . .
27 1 1 2.1 2.3 2.4 2.4 2.6 20 16 14 14 13 13.0 10.5 6.9 5.9 5.8 31 24 27 25 22 224 95 71 65 53
28 1 1 2.1 . 2.6 3.4 3.8 15 13 13 12 12 15.7 4.7 3.1 2.8 2.4 31 28 31 39 . 67 78 . 52 39
29 1 1 1.8 1.7 2.3 1.9 1.7 24 22 21 20 21 14.6 11.7 17.1 14.9 10.9 39 34 29 30 24 28 29 34 20 43
30 2 0 2.5 2.3 2.3 2.2 2.1 18 20 22 23 17 11.7 12.7 16.0 16.1 15.1 26 29 27 26 25 157 104 132 115 90
31 2 0 1.8 1.9 1.6 2.6 2.8 24 26 28 23 19 12.6 9.4 8.2 9.9 11.3 28 28 24 30 27 462 500 430 291 140
32 2 0 2.3 2.0 . . . 19 22 . . . 14.7 13.0 . . . 23 26 . . . 136 183 . . .
33 2 0 2.2 2.6 2.5 2.3 2.4 16 16 16 15 15 21.6 15.4 11.7 4.3 3.7 23 27 29 27 28 120 140 162 123 95
34 2 0 2.5 2.4 2.2 . . 17 18 17 . . 13.8 10.2 9.3 . . 30 29 27 . . 87 102 69 . .
35 2 0 2.9 2.6 2.8 3.0 3.7 17 15 14 15 14 22.1 8.7 8.3 6.6 5.5 38 37 39 40 41 131 134 114 117 103
36 2 0 2.0 1.7 . . . 13 13 . . . 9.1 9.9 . . . 25 24 . . . 95 47 . . .
37 2 0 2.7 2.2 3.2 2.9 3.5 15 16 16 15 17 28.2 25.2 35.4 40.8 60.5 38 35 28 25 24 153 117 107 129 87
38 2 0 2.1 1.8 1.6 1.7 . 21 25 25 23 . 12.2 15.9 13.6 19.9 . 23 21 22 24 . 98 127 27 139 .
39 2 1 1.6 1.8 2.2 2.5 2.6 24 20 17 17 16 12.3 7.5 6.6 5.7 4.4 27 27 31 32 27 55 79 107 91 73
40 2 1 2.8 3.2 3.4 3.7 . 19 16 . 16 . 14.5 8.5 4.7 3.8 3.6 30 38 32 36 . 74 137 121 131 149
41 2 1 1.8 2.5 3.3 3.5 3.5 20 16 13 14 14 9.2 5.7 2.8 2.5 1.8 27 29 31 32 32 55 54 37 35 28
42 2 1 2.2 2.6 2.6 2.5 2.6 19 17 16 17 17 13.0 7.0 4.6 4.3 3.6 35 39 37 37 37 100 101 58 105 45
43 2 1 2.7 3.1 3.3 3.1 3.2 17 11 12 12 . 13.4 9.3 4.9 3.7 2.0 30 33 33 33 34 480 167 212 162 69
44 2 1 2.8 2.1 2.3 2.8 2.9 20 15 15 14 14 17.8 24.2 16.8 16.6 10.0 30 24 29 28 26 242 131 89 198 130
45 2 1 2.8 2.3 2.3 2.7 2.3 18 15 15 15 16 17.4 20.0 18.1 16.4 11.7 27 30 28 29 26 181 107 82 87 54
46 3 0 3.2 . . 2.9 2.7 18 17 19 18 16 17.8 17.6 8.5 7.9 6.7 20 26 23 30 30 140 104 122 268 190
47 3 0 2.3 2.6 . . . 20 19 21 . . 15.5 17.3 13.9 . . 25 31 29 . . 29 30 40 . .
48 3 0 2.4 . 2.8 2.4 2.7 14 15 14 14 14 20.0 15.5 18.3 14.1 17.5 41 28 25 27 30 133 159 78 66 80
49 3 1 2.8 2.8 7.9 3.0 3.5 15 15 13 12 12 11.1 10.6 6.7 3.9 2.6 33 33 37 39 39 58 45 47 35 30
50 3 1 2.3 2.6 2.2 2.6 2.6 17 16 18 17 18 44.1 42.6 38.0 36.6 33.0 28 30 27 27 29 77 78 72 61 57
51 3 1 3.3 2.8 2.5 3.3 2.6 19 12 12 11 12 5.4 1.8 1.2 1.2 1.0 33 39 45 49 48 415 46 72 43 34
52 3 1 2.2 2.2 . . . 17 20 . . . 30.3 26.4 . . . 30 29 . . . 100 85 . . .
53 4 0 3.1 . . . . 15 14 14 14 13 23.1 15.0 6.9 4.9 3.6 38 33 33 36 42 115 180 170 136 .
54 4 0 3.0 2.7 2.8 . . 17 15 15 16 . 38.7 40.0 32.2 35.5 29.5 31 28 24 34 29 385 175 163 305 460
55 4 0 2.2 2.5 2.9 2.5 2.5 18 18 18 17 . 9.4 6.8 6.0 4.6 4.1 21 24 26 27 . 162 135 56 51 68
56 4 0 2.8 2.4 2.6 2.5 . 14 15 15 14 . 29.2 29.1 33.5 30.2 . 28 28 30 31 . 86 95 122 128 .
57 4 0 2.5 2.7 3.2 3.8 3.1 20 16 17 . . 24.0 22.0 25.0 22.5 13.0 36 37 42 42 35 163 310 575 850 465
58 4 1 2.2 . 3.3 3.6 3.6 20 16 14 14 14 7.2 3.5 2.5 2.3 2.5 40 41 45 47 47 141 72 77 66 66
59 4 1 2.1 . 3.2 2.4 2.8 20 18 16 15 16 28.1 16.5 15.6 7.9 6.9 27 35 25 24 33 232 150 85 121 325
60 4 1 2.4 2.1 2.4 2.6 . 16 17 17 15 13 13.2 6.7 7.3 5.0 4.5 35 35 34 35 . 145 67 44 87 72
61 4 1 3.0 2.6 2.6 3.2 3.3 17 14 14 14 13 33.5 34.0 9.9 6.6 4.4 21 29 26 24 25 213 113 188 127 112
62 4 1 2.4 2.8 3.0 . . 17 16 16 . . 17.8 10.7 7.7 . . 24 27 29 . . 73 66 169 . .
63 4 1 2.2 2.6 . . . 16 13 . . . 22.5 13.5 . . . 26 27 . . . 120 192 . . .
64 4 1 2.1 2.3 2.2 3.1 3.4 22 20 18 18 18 19.0 12.9 8.7 11.5 11.0 25 27 27 28 30 89 70 47 38 48
65 4 1 2.2 2.2 2.4 . . 17 16 15 . . 18.0 12.3 11.1 . . 33 34 33 . . 188 101 102 . .
66 4 1 2.7 2.5 3.4 3.0 3.1 18 16 14 15 . 27.0 12.3 9.2 5.2 3.7 36 35 37 34 . 166 128 107 25 16
;
run;
proc print data=alc_hep;
id subject center treatment;
var bilirubin0-bilirubin4;
title 'Alcoholic Hepatitis Data Set';
run;
proc gplot data=alc_hep;
plot bilirubin4*bilirubin0=treatment/vaxis=axis1 haxis=axis2 nolegend frame;
axis1 label=(a=90 'Visit 4 Bilirubin');
axis2 label=('Visit 0 Bilirubin');
symbol1 value=x color=black;
symbol2 value=o color=black;
title2 'Scatterplot of Visit 4 vs. Visit 0 Measurements';
run;
proc gplot data=alc_hep;
plot bilirubin4*center=treatment/vaxis=axis1 haxis=axis2 nolegend frame;
axis1 label=(a=90 'Visit 4 Bilirubin');
axis2 offset=(20) label=('Clinical Center') minor=none major=(number=4);
symbol1 value=x color=black;
symbol2 value=o color=black;
title2 'Scatterplot of Visit 4 Measurements vs. Clinical Center';
run;
proc glm data=alc_hep;
class center treatment;
model bilirubin4=center treatment bilirubin0 treatment*center treatment*bilirubin0;
title2 'ANCOVA for determining interactions';
run;
proc glm data=alc_hep;
class center treatment;
model bilirubin4=center treatment bilirubin0;
means treatment;
lsmeans treatment/stderr pdiff;
title2 'ANCOVA';
run;Now, run the program and look at the output. Notice “66 observations read, 47 used.” This means 19 patients are missing data for a term in the model, so SAS cannot use their data. In this case, 19 are missing bilirubin4 measurements.
Considering the Type III SS in the output, do you see that baseline bilirubin (bilirubin0) was an important covariate? The treatment groups do not differ significantly. Nor was significant interaction observed between center and treatment or baseline bilirubin and treatment.
A more parsimonious model is run; again only baseline bilirubin has a significant effect. The difference in the raw means at Week 4 is about 4 units, but is reduced after adjusting for the covariates (see the adjusted means.). The difference between treatments was not statistically significant ( p = 0.2782), although methylprednisolone showed a numerical advantage over placebo with adjusted means of 7.84 and 10.84, respectively for the two treatments.
1.3 Model-Based Methods: Binary Outcomes
For a binary outcome, logistic regression analysis is used to model the log odds as a linear combination of parameters and regressors. Let \(p\left(X_1, X_2, \dots , X_K\right)\) denote the probability of success in the presence of the K regressors. The logistic regression model for the log-odds for the ith patient is
\[ log\left( \dfrac{p(X_{1i}, X_{2i}, ... ,X_{Ki}}{1-p(X_{1i}, X_{2i}, ... ,X_{Ki})} \right)=\beta_0+\beta_1X_{1i}+\beta_2X_{2i}+ ... +\beta_KX_{Ki} \]
Notice that \(\beta_0\) represents the reference log odds, i.e., when \(X_{1i} = 0, X_{2i} = 0, \dots , X_{Ki} = 0\). Consider a simple model with one covariate (K = 1) which is binary, e.g., \(X_{1i} = 0\) if the ith patient is in the placebo group and 1 if the ith patient is in the treatment group. Then the log odds ratio for comparing the treatment to the placebo group is
\[ log\left( \dfrac{p(X_{1i}=1)}{1-p(X_{1i}=1)} / \dfrac{p(X_{1i}=0)}{1-p(X_{1i}=0)} \right)=(\beta_0+\beta_1)-\beta_0=\beta_1 \]
If the covariate is ordinal or continuous, then
\[ log\left( \dfrac{p(X_{1i}=x)}{1-p(X_{1i}=x )} / \dfrac{p(X_{1i}=0)}{1-p(X_{1i}=0) } \right)=(\beta_0+\beta_1x)-\beta_0=\beta_1x \]
so that the odds ratio is \(\text{exp}\left(\beta_1x\right)\). This illustrates that changes in a covariate have a multiplicative effect on the baseline risk.
For example, suppose x represents (age - 18) in a study of adults, and that the estimated coefficient is \(\hat{\beta}_1\) = 0.04 with a p-value < 0.05. Then the estimated odds ratio is exp(0.04) = 1.041. This may not seem like a clinical meaningful odds ratio, but remember that it represents the increase in odds between a 19-year-old and an 18-year-old. For a 25-year-old person, the estimated odds ratio is \(\text{exp}\left(0.04 \times 7\right) = 1.323\).
For the logistic regression model, each \(\beta_j, j = 1, 2, \dots , K\), represents the log odds ratio for the \(j^{th}\) covariate. An equivalent expression for the logistic regression model in terms of the probability is
\[ p=(X_{1i}, X_{2i}, ... ,X_{Ki})=\dfrac{1}{1+exp\left\{ -(\beta_0+\beta_1X_{1i}++\beta_2X_{2i}+ ... +\beta_KX_{Ki} )\right\}} \]
Logistic regression models are available for an ordinal response. Suppose that an outcome variable, Y, is ordinal and that we designate its ordered categories as 0, 1, … , C. We model the ordinal logits as
\[ log\left( \dfrac{Pr[y \ge c | X_{1i}, X_{2i}, ... ,X_{Ki}]}{1-Pr[y \ge c | X_{1i}, X_{2i}, ... ,X_{Ki}]} \right)=\beta_{0c}+\beta_1X_{1i}+\beta_2X_{2i}+ ... + \beta_KX_{Ki} , c=1,2, ... , C \]
The ordinal logistic regression model has C intercept terms, but only one term for each regressor. This reduced modeling for an ordinal outcome assumes proportional odds (beyond the scope of this course).
Example 1.4 (Using PROC LOGISTIC in SAS to perform ordinal logistic regression) Download the SAS code: sas_logistic_regression.sas
Boyle et al (Masking of physicians in the Growth Failure in Children with Renal Disease clinical trial.Pediatric Nephrology 1993; 7: 204-206) investigated the success of the masking in the randomized, double-blinded, multi-center (GFRD (Pediatric Nephrology 1993).pdf) clinical trial. The clinical director at each center was asked to identify or guess the assigned treatment for each randomized patient.
***********************************************************************
* This is a program that illustrates the use of PROC LOGISTIC in SAS *
* to perform ordinal logistic regression. *
* *
* The sample data set is taken from the following article: *
* Boyle RM, Chinchilli VM, Shasky DA. (1993). Masking of *
* Physicians in the Growth Failure in Children with Renal Diseases *
* Clinical Trial. Pediatric Nephrology 7, 204-206. *
***********************************************************************;
proc format;
value scorefmt -3='Incorrect_certain'
-2='Incorrect_probable'
-1='Incorrect_guess'
0='Unsure'
1='Correct_guess'
2='Correct_probable'
3='Correct_certain';
run;
data gfrd;
input center id months score trtgroup $;
format score scorefmt.;
label months='Months on Study';
cards;
1 1906 9 2 A
2 2901 9 1 B
3 3908 56 -1 B
3 3911 15 1 A
3 3919 9 1 B
4 4901 25 1 A
4 4912 12 1 B
4 4913 13 1 B
5 5901 0 0 A
5 5902 28 0 A
5 5905 2 0 B
6 6904 13 -2 A
6 6920 11 -2 A
6 6922 10 2 A
7 7905 29 -1 B
7 7910 39 1 A
7 7916 40 1 A
7 7919 23 1 A
7 7920 4 -1 B
7 7921 26 -1 B
7 7926 33 1 A
7 7927 30 1 A
7 7929 14 -1 B
7 7930 17 -1 B
7 7931 12 1 A
8 8904 18 -1 B
8 8905 30 -1 A
8 8909 9 1 B
8 8915 2 1 A
8 8917 5 -1 B
8 8918 2 -1 A
9 9901 45 -1 B
9 9903 54 1 A
9 9907 61 1 B
9 9908 28 -1 B
9 9918 31 1 A
9 9919 25 1 A
11 11901 21 -1 B
11 11905 47 -2 B
11 11906 15 -1 A
14 14902 14 -1 B
14 14907 0 1 B
14 14908 38 -1 A
14 14911 0 0 A
14 14912 36 1 B
14 14913 32 -1 A
14 14916 1 1 A
14 14917 7 1 A
16 16904 31 1 A
16 16905 34 1 A
16 16906 13 -1 B
18 18902 11 1 B
18 18904 8 1 B
21 21906 46 2 B
21 21910 14 -2 B
21 21912 6 2 A
21 21915 26 -2 A
21 21916 25 2 B
21 21917 26 -2 A
21 21918 26 -2 B
21 21919 19 2 A
21 21920 15 -2 A
21 21921 2 -2 B
21 21922 15 2 B
22 22901 26 1 A
22 22902 26 1 B
22 22903 26 1 A
22 22909 5 1 B
23 23901 31 -1 B
23 23903 7 1 B
24 24914 9 2 B
24 24917 22 -2 A
24 24918 6 1 A
24 24919 2 -2 B
26 26901 6 -2 B
26 26903 7 -2 A
27 27901 15 -1 A
27 27904 18 1 B
27 27905 3 -2 B
28 28901 7 2 A
28 28902 33 1 B
28 28904 4 1 A
28 28905 16 -2 B
30 30912 15 2 A
31 31901 1 1 A
31 31902 38 1 B
31 31903 31 -1 B
35 35901 6 0 A
35 35904 11 0 B
38 38907 4 0 A
41 41904 9 2 B
42 42901 2 1 A
42 42903 2 -1 B
42 42904 2 -1 B
;
run;
proc print data=gfrd;
title 'GFRD Example';
run;
data gfrd2;
set gfrd;
newscore=0;
if score>0 then newscore=1;
treatment=0;
if trtgroup="A" then treatment=1;
run;
proc logistic data=gfrd2 order=internal descending;
model newscore=treatment months;
title2 'Logistic Regression of the Masking Score';
run;
A logistic regression analysis was applied to the binary outcome of incorrect/correct guess. Regressors included treatment group and months in the study. Note the creation of the binary variables, newscore from the score variable, within the data step before the proc logistic statements. Similarly, a binary variable ‘treatment’ is created from the variable trtgroup.
Run the program. On the output, you see “probability modeled is newscore=1,” which also indicates the order for calculating the odds ratio. The confidence intervals for the odds ratios all include 1. With no statistically significant results, the investigators remained confident that the masking scheme was successful.
1.4 Model-Based Methods: Time-to-event Outcomes
For a time-to-event outcome variable, proportional hazards regression is available. Let \(\lambda \left(t|X_{1i}, X_{2i}, \dots ,X_{Ki}\right)\) denote the hazard function for the ith patient at time \(t, i = 1, 2, \dots , n\), where the K regressors are denoted as \(X_{1i}, X_{2i}, \dots , X_{Ki}\). The baseline hazard function at time t, i.e., when \(X_{1i} = 0, X_{2i} = 0, \dots , X_{Ki} = 0\), is denoted as \(\lambda_0\left(t\right)\). The baseline hazard function is analogous to the intercept term in the multiple regression model or logistic regression model.
The proportional hazards regression model states that the log of the hazard function to the baseline hazard function at time t is a linear combination of parameters and regressors, i.e.,
\[ log\left( \dfrac{\lambda(t|X_{1i},X_{2i}, \dots ,X_{Ki})}{\lambda_0(t)} \right)=\beta_{1} X_{1i} + \beta_{2} X_{2i} + \dots + \beta_{K}X_{Ki} \]
The proportional hazards regression model is nonparametric because we do not specify a specific distribution function for the time-to-event outcome variable. The proportionality assumption, however, is important.
The ratio of hazard functions can be considered a ratio of risk functions, so the proportional hazards regression model is a function of relative risk (unlike the logistic regression models which are a function of the odds ratio). Changes in a covariate have a multiplicative effect on the baseline risk. The model in terms of the hazard function at time t is:
\[ \lambda(t|X_{1i},X_{2i}, \dots ,X_{Ki})= \lambda_0(t)exp(\beta_{1} X_{1i} + \beta_{2} X_{2i} + \dots + \beta_{K}X_{Ki}) \]
1.5 Model-Based Methods: Building a Model
Regression/ANCOVA models as described above are most useful when
- they contain a few clinically relevant and interpretable prognostic variables
- the parameters or coefficients are estimated with relatively high precision
- the prognostic factors each carry independent information about the outcome variable
- the model is consistent with other clinical and biological data
For a given situation, however, it may not be easy to construct a model that satisfies these criteria.
With available statistical software in modern computers, portions of the model-building process are automatic. Caution must be exercised, however, for the following reasons.
- The criteria employed by the software may be inappropriate, e.g., relying solely on p-values.
- There are poor statistical properties when performing a large number of tests and refitting models.
- It is not possible to incorporate outside information into the model-building process.
- The software may not handle the problem of missing data very well.
The model-building process requires thought and an understanding of the clinical situation. Some statisticians only use prognostic variables in the model for which there exist plausible biological reasons for their inclusion.
Approaches
Computer software to assist in the construction and evaluation of a model follows several approaches.
One approach is called a step-up or forward selection process, in which the initial model contains no regressors, but they enter the model one at a time. In this situation, a regressor enters the model if its p-value is less than a critical value, say 0.05.
Another approach is called the step-down or backward selection process, in which the initial model contains all the regressors. In this situation, a regressor is eliminated from the model if its p-value is not less than the critical value.
A third approach, called stepwise selection, is a modification of forward selection. In this situation, after a new variable enters the model, all the variables that had entered the model previously are reexamined to see if their p-values have changed. If any of the revised p-values exceed the critical value, then the corresponding variables are eliminated from the model.
A fourth approach involves finding the best one-variable-model, the best two-variable model, etc. with the help of software, and then using judgment as to which is the best overall model, i.e., if the (c+1)-variable model is only slightly better than the c-variable model, the latter is selected. It is prudent to attempt a variety of models and approaches to determine if the results are consistent.
Some statisticians favor the backward selection or step-down process, although there is no universal agreement among statisticians. It is not unusual for a particular data set to discover that step-up and step-down selection algorithms lead to different models. The main reason for this is that the regressors/covariates are not completely independent of each other.
When a variable is entered into or removed from a model, the p-values of the other variables will change. Consider a linear model with two potential regressors, \(X_1\) and \(X_2\), and suppose that they are strongly correlated (“independent variables” is a misnomer). Suppose that in a model with \(X_1\) only, \(X_1\) is significant, and in a model with \(X_2\) only, \(X_2\) is significant. When a model is constructed with both \(X_1\) and \(X_2\), however, the contribution by \(X_2\) to the model is no longer statistically significant. Because \(X_1\) and \(X_2\) are strongly correlated, \(X_2\) has very little predictive power when \(X_1\) already is in the model.
Initial screening of the entire set of candidate regressors/covariates is advised. Many statisticians recommend that each potential regressor be examined individually in a simple model. This can help identify potential regressors for which there is not a strong biological justification.
Usually, the critical significance level in this first-stage approach is more lenient, say 0.10 or 0.15. Then all the regressors that meet this first-stage criterion and/or that have biological/clinical justification comprise the set of regressors that are subjected to the model-building process. Clinical input always should augment this first-stage process.
Example 1.5 (Using PROC PHREG in SAS to perform proportional hazards regression) Download the SAS code: sas_proportional_hazards.sas
A safety and efficacy study was conducted in 83 patients with malignant mesothelioma, an uncommon lung cancer that is strongly associated with asbestos exposure. Patients underwent one of three types of surgery, namely, biopsy, limited resection, and extrapleural pneumonectomy (EPP). Treatment assignment was nonrandomized and based on the extent of disease at the time of diagnosis. Thus, there can be a strong procedure selection bias.
***********************************************************************
* This is a program that illustrates the use of PROC PHREG in SAS *
* to perform proportional hazards regression. *
* *
* The sample data set is based on the results from an SE trial on 83 *
* patients with malignant mesothelioma, an uncommon lung cancer that *
* is strongly associated with asbestos exposure. Patients underwent *
* one of three types of surgery, namely, biopsy, limited resection, *
* and extrapleural pneumonectomy (EPP). Treatment assignment was *
* based on the extent of disease at the time of diagnosis. *
***********************************************************************;
proc format;
value sexfmt 0='female' 1='male';
value psfmt 0='low' 1='high';
value wtchgfmt 1='no' 2='yes';
value surgfmt 1='biopsy' 2='limited resection' 3='EPP';
value eventfmt 0='no' 1='yes';
run;
data mesoth;
input age sex ps hist wtchg surg pftime prog stime dead;
label age='Age'
sex='Sex'
ps='Performance Status'
hist='Histologic Subtype'
wtchg='Weight Change at DX'
surg='Surgery Type'
pftime='PFT Event'
prog='PFtime Censoring'
stime='Survival Time'
dead='Death Event';
format sex sexfmt.
ps psfmt.
wtchg wtchgfmt.
surg surgfmt.
prog eventfmt.
dead eventfmt.;
cards;
60 1 1 136 1 3 394 1 823 1
59 1 0 136 2 3 1338 0 1338 0
51 0 0 130 1 1 184 1 270 1
73 1 1 136 1 3 320 0 320 1
74 1 0 136 2 1 168 0 168 1
39 0 0 136 1 1 36 1 247 1
46 1 1 131 1 3 552 1 694 0
71 1 0 136 1 1 133 1 316 1
69 1 0 136 1 1 175 1 725 0
49 1 0 131 1 1 327 0 327 1
69 1 0 131 1 2 0 0 0 1
72 1 0 131 1 1 676 1 963 0
44 0 0 130 2 2 223 1 265 1
45 1 0 136 2 2 184 1 237 1
57 1 0 132 1 2 145 1 176 1
60 0 1 131 1 1 316 0 316 1
22 1 1 131 1 2 87 1 310 1
46 0 1 131 1 1 135 1 166 1
60 1 0 131 1 3 1 1 28 1
72 1 0 131 1 2 199 1 730 1
65 1 0 131 1 3 39 0 39 1
65 1 1 131 1 2 61 1 116 1
60 1 0 131 1 3 17 0 17 1
64 1 0 131 2 3 799 1 1229 1
61 1 0 131 2 1 61 1 294 1
38 1 0 131 1 1 176 1 322 1
65 1 1 136 1 3 6 0 6 1
73 0 1 131 1 2 292 1 422 1
74 1 0 136 2 2 22 1 22 1
76 1 0 136 1 1 106 1 375 1
57 1 1 131 1 3 248 1 302 1
60 0 0 . 1 1 63 1 365 1
56 1 0 136 1 1 145 1 387 1
62 0 0 136 1 1 104 1 327 1
60 1 0 131 1 1 20 1 247 1
67 0 0 131 1 1 181 1 669 1
64 1 0 131 1 2 89 1 948 1
67 1 1 136 1 1 0 1 400 1
56 0 1 131 1 2 724 1 1074 0
52 1 0 160 2 1 62 1 137 1
56 1 0 131 1 3 93 1 210 1
44 1 0 136 1 3 402 1 648 1
50 0 0 136 2 2 141 1 520 1
63 1 0 . 2 1 156 1 304 1
68 1 1 131 1 2 265 1 349 1
50 1 0 . 2 3 305 1 317 1
41 0 1 131 1 1 181 1 395 1
60 1 0 131 1 1 274 1 503 1
65 1 0 136 2 2 20 1 20 1
47 1 1 131 1 3 411 1 679 0
46 1 1 131 1 2 624 0 624 0
70 1 1 131 1 2 278 1 617 0
58 1 0 136 1 1 20 1 85 1
57 1 1 132 1 3 112 1 139 1
75 1 0 132 2 2 47 1 47 1
66 1 1 136 1 3 294 1 523 1
77 1 0 . 1 1 126 1 157 1
65 0 0 . 2 1 117 1 545 0
46 0 0 131 1 1 63 1 218 1
71 0 1 132 2 1 139 0 139 1
61 1 0 136 1 1 538 1 1170 0
58 1 0 131 1 3 390 1 722 1
49 1 1 136 1 3 1102 0 1102 0
50 1 0 136 1 3 166 1 182 1
73 1 0 136 1 2 58 1 136 1
44 1 0 136 1 1 406 0 406 1
47 0 1 131 1 3 1123 0 1123 0
68 1 0 136 1 1 1009 1 1029 0
66 1 0 132 1 2 37 1 112 1
46 1 1 131 1 1 104 1 764 1
56 1 1 136 1 2 33 1 225 1
68 1 1 136 1 1 20 1 122 1
59 1 0 136 1 2 73 1 165 1
58 0 0 131 1 1 4 0 4 1
66 1 1 132 2 2 205 1 361 1
82 1 0 160 1 1 78 0 78 1
73 1 0 131 1 1 1265 0 1265 1
57 0 0 130 1 2 273 1 318 1
72 1 1 136 2 1 2 1 362 1
69 1 1 . 1 2 1093 0 1093 0
64 0 1 130 1 1 475 0 475 1
65 1 1 130 1 2 292 0 292 1
72 1 1 130 1 2 324 1 499 0
run;
proc print data=mesoth;
title 'Mesothelioma Example';
run;
data mesoth2;
set mesoth;
biop_EPP=0;
lr_EPP=0;
if surg=1 then biop_EPP=1;
if surg=2 then lr_EPP=1;
wtchg=wtchg-1;
run;
proc phreg data=mesoth2;
model stime*dead(0)=biop_EPP lr_EPP age sex ps hist wtchg/selection=stepwise
include=2 slentry=0.10 slstay=0.10 risklimits;
title2 "Proportional Hazards Regression of Survival Time";
run;
A proportional hazards regression analysis was applied that included a stepwise selection process to build a model with prognostic factors in addition to surgery type. Examine the program:
Run the program. Do you agree that histologic subtype is the only statistically significant covariate (p = 0.025)?
If there is a large amount of correlation among a set of regressors, then a problem known as collinearity can exist. Collinearity can cause difficulties in interpretation because it is not obvious which regressor in a set of highly correlated regressors should be used in the model.
In addition, collinearity, if not diagnosed, can lead to numerical instabilities in the software and yield strange results. It is recommended that the correlations among the set of regressors be examined prior to the model-building process, e.g., using PROC CORR of SAS.
If two or more regressors are observed to be highly correlated (say with correlations above 0.8 or below -0.8), then most of the variables in a correlated set should not be included in the model-building process.
1.6 Missing Values
Missing values could cause a problem during the model-building process if subjects display different patterns of missingness for the set of regressors/covariates. For example, consider the aforementioned linear model with two potential regressors, \(X_1\) and \(X_2\). Suppose that there are 100 subjects, but 50 are missing \(X_1\) and the remaining 50 are missing \(X_2\). Thus, no subject has \(X_1\) and \(X_2\) observed simultaneously, so a model with both regressors is not possible. This is an extreme case, but most model-building endeavors encounter some form of missingness.
Hopefully, missing data among the regressors/covariates are not related to the outcome. If this is not the case, then it may not be possible to develop a model that is unbiased. For example, if the patients with the most severe form of the disease are the ones with missing values for the regressors/covariates, then the resultant model that does not include these patients will be biased.
As has been discussed earlier, data imputation is one way to handle the situation of missing values. Data imputation involves the estimation of the missing values in a manner that is consistent and then “imputing” the estimated values for the missing values. Thus, every subject will have a complete set of regressors/covariates and the statistical analysis can proceed without eliminating any subjects.
The values to be imputed can be estimated by averaging over the observed values or by fitting regression models in which the regressors with missing values become the outcome variables. Obviously, there is some danger of introducing large biases with imputation, so it must be performed carefully on a case-by-case basis.
Make every effort to collect complete data to avoid such problems. When data are missing, be certain to report the numbers of patients used in each analysis and any methods used to impute missing values.
1.7 Model Validation
Statisticians have recommended a number of approaches to evaluate a model. One approach involves partitioning the data set into an estimation data set, and a validation data set (usually in a two-thirds versus one-third split).
The estimation data set is used to build the model, and hence, estimate the parameters. The validation data set is used to validate the model by inserting a patient’s set of observed regressors into the estimated model equation and predicting the outcome response for that subject.
If the predicted outcome is relatively close to the observed outcome for the subjects in the validation data set, then the model is considered valid.
Another approach is called the “leave-one-out” method and consists of eliminating the first patient from the data set with n subjects, estimating the model equation based on the remaining \(n - 1\) patients, calculating the predicted outcome for the first patient, and then comparing the first patient’s predicted and observed outcomes.
This process is performed for each of the n patients and an overall validation statistic is constructed.
These validation procedures work fine for nonrandomized studies, but for randomized clinical trials, they probably should be applied only to secondary and exploratory statistical analyses.
1.8 Random Error
Random error is also known as variability, random variation, or ‘noise in the system’. The heterogeneity in the human population leads to relatively large random variation in clinical trials.
Random error (variability, imprecision) can be overcome by increasing the sample size. This is illustrated in this section via *hypothesis testing* and *confidence intervals*, two accepted forms of statistical inference.
Review of Hypothesis testing
In hypothesis testing, a null hypothesis and an alternative hypothesis are formed. Typically, the null hypothesis reflects the lack of an effect and the alternative hypothesis reflects the presence of an effect (supporting the research hypothesis). The investigator needs to have sufficient evidence, based on data collected in a study, to reject the null hypothesis in favor of the alternative hypothesis.
Suppose an investigator is conducting a two-armed clinical trial in which subjects are randomized to group A or group B, and the outcome of interest is the change in serum cholesterol after 8 weeks. Because the outcome is measured on a continuous scale, the hypotheses are stated as:
\[ H_0\colon \mu_A = \mu_B \text{ versus } H_0: \mu_A \ne \mu_B \]
where \(\mu_{A} \text{ and }\mu_{B}\) represent the population means for groups A and B, respectively.
The alternative hypothesis of \(H_1\colon \mu_{A} \ne \mu_{B}\) is labeled a “two-sided alternative” because it does not indicate whether A is better than B or vice versa. Rather, it just indicates that A and B are different. A “one-sided alternative” of \(H_1\colon \mu_{A}< \mu_{B}\) (or \(H_1\colon \mu_{A} > \mu_{B}\)) is possible, but it is more conservative to use the two-sided alternative.
The investigator conducts a study to test his hypothesis with 40 subjects in each of group A and group B \(\left(n_{A}=40 \text{ and }n_{B} = 40\right)\). The investigator estimates the population means via the sample means (labeled \(\bar{x}_A\) and \(\bar{x}_B\), respectively). Suppose the average changes that we observed are \(\bar{x}_A =7.3\) and \(\bar{x}_B= 4.8\text{ mg/dl}\). Do these data provide enough evidence to reject the null hypothesis that the average changes in the two populations means are equal? (The question cannot be answered yet. We do not know if this is a statistically significant difference!)
If the data approximately follow a normal distribution or are from large enough samples, then a two-sample *t* test is appropriate for comparing groups A and B where:
\[ t = (\bar{x}_A - \bar{x}_B) / (\text{standard error of } \bar{x}_A - \bar{x}_B). \]
We can think of the two-sample *t* test as representing a signal-to-noise ratio and ask if the signal is large enough, relative to the noise detected? In the example, \(\bar{x}_A = 7.3\) and \(\bar{x}_B=4.8 mg/dl\). If the standard error of \(\bar{x}_A-\bar{x}_B\) is 1.2 mg/dl, then:
\[ t_{obs} = (7.3 - 4.8) / 1.2 = 2.1 \]
But what does this value mean?
Each *t* value has associated probabilities. In this case, we want to know the probability of observing a *t* value as extreme or more extreme than the *t* value actually observed, if the null hypothesis is true. This is the *p*-value. At the completion of the study, a statistical test is performed and its corresponding *p*-value calculated. If the *p*-value \(< \alpha\), then \(H_0\) is rejected in favor of \(H_1\).
Two types of errors can be made in testing hypotheses: rejecting the null hypothesis when it is true or failing to reject the null hypothesis when it is false. The probability of making a Type I error, represented by \(\alpha\) (the significance level), is determined by the investigator prior to the onset of the study. Typically, \(\alpha\) is set at a low value, say 0.01 or 0.05.
Here is an interactive table that presents these options. Roll your cursor over the specific decisions to view results.
| Decision | Reality | |
|---|---|---|
| \(H_0\) is true | \(H_0\) is false | |
| Reject \(H_0\), (conclude \(H_a\)) | Type I Error | Correct decision |
| Fail to reject \(H_0\) | Correct decision | Type II Error |
In our example, the *p*-value = probability that \(|t| > 2.1] = 0.04\)
Thus, the null hypothesis of equal mean change for in the two populations is rejected at the 0.05 significance level. The treatments were different in the mean change in serum cholesterol at 8 weeks.
Note that \(\beta\) (the probability of not rejecting \(H_0\) when it is false) did not play a role in the test of hypothesis.
The importance of \(\beta\) came into play during the design phase when the investigator attempted to determine the appropriate sample size for the study. To do so, the investigator had to decide on the *effect size* of interest, i.e., a clinically meaningful difference between groups A and B in the average change in cholesterol at 8 weeks. The statistician cannot determine this but can help the researcher decide whether he has the resources to have a reasonable chance of observing the desired effect or should rethink his proposed study design.
The effect size is expressed as: \(\delta = \mu_{A}-\mu_{B}\).
The sample size should be determined such that there exists good statistical power \(\left(\beta = 0.1\text{ or }0.2\right)\) for detecting this effect size with a test of hypothesis that has significance level α.
A *sample size formula* that can be used for a two-sided, two-sample test with \(\alpha = 0.05\) and \(\beta = 0.1\) (90% statistical power) is:
\[ n_A = n_A = 21\sigma^{2}/\delta^{2} \]
where σ = the population standard deviation (more detailed information will be discussed in a later lesson).
Note that the sample size increases as σ increases (noise increases).
Note that the sample size increases as \(\delta\) decreases (effect size decreases).
In the serum cholesterol example, the investigator had selected a meaningful difference, \(\delta = 3.0 \text{ mg/dl}\) and located a similar study in the literature that reported \(\sigma = 4.0 \text{ mg/dl}\). Then:
\[ n_A = n_B = 21\sigma^{2}/\delta^{2} = (21 \times 16) / 9 = 37 \]
Thus, the investigator randomized 40 subjects to each of group A and group B to assure 90% power for detecting an effect size that would have clinical relevance.
Many studies suffer from low statistical power (large Type II error) because the investigators do not perform sample size calculations.
If a study has very large sample sizes, then it may yield a statistically significant result without any clinical meaning. Suppose in the serum cholesterol example that \(\bar{x}_A = 7.3\) and \(\bar{x}_A = 7.1 \text {mg/dl}\) , with \(n_{A} = n_{B} = 5,000\). The two-sample *t* test may yield a *p*-value = 0.001, but \(\bar{x}_A-\bar{x}_B = 7.3 - 7.1 = 0.2\text { mg/dl}\) is not clinically interesting.
Confidence Intervals
A confidence interval provides a plausible range of values for a population measure. Instead of just reporting \(\bar{x}_A-\bar{x}_B\) as the sample estimate of \(\mu_{A}-\mu_{B}\), a range of values can be reported using a confidence interval.
The confidence interval is constructed in a manner such that it provides a high percentage of “confidence” (95% is commonly used) that the true value of \(\mu_{A}-\mu_{B}\) lies within it.
If the data approximately follow a bell-shaped normal distribution, then a 95% confidence interval for \(\mu_{A}-\mu_{B}\) is
\[ (\bar{x}_A - \bar{x}_B) \pm \left \{1.96 \times (\text{standard error of } \bar{x}_A - \bar{x}_B)\right \} \]
In the serum cholesterol example, \((\bar{x}_A-\bar{x}_B) = 7.3-4.8=2.5 \text{mg/dl}\) and the standard error = \(1.2 \text{mg/dl}\). Thus, the approximate 95% confidence interval is:
\[ 2.5 \pm (1.96 \times 1.2) = \left [ 0.1, 4.9 \right ] \]
Note that the 95% confidence interval *does not* contain 0, which is consistent with the results of the 0.05-level hypothesis test (*p*-value = 0.04). ‘No difference’ is not a plausible value for the difference between the treatments.
Notice also that the length of the confidence interval depends on the standard error. The standard error decreases as the sample size increases, so the confidence interval gets narrower as the sample size increases (hence, greater precision).
A confidence interval is actually is more informative than testing a hypothesis. Not only does it indicate whether \(H_0\) can be rejected, but it also provides a plausible range of values for the population measure. Many of the major medical journals request the inclusion of confidence intervals within submitted reports and published articles.
1.9 Summary
In this lesson, among other things, we learned:
- to distinguish between random error and bias in collecting clinical data.
- to state how the significance level and power of a statistical test are related to random error.
- to accurately interpret a confidence interval for a parameter.

