36
1 STA 617 – Chp11 STA 617 – Chp11 Models for repeated data Models for repeated data Analyzing Repeated Categorical Response Data Repeated categorical responses may come from repeated measurements over time on each individual or from a set of measurements that are related because they belong to the same group or cluster (e.g., measurements made on siblings from the same family, measurements made on a set of teeth from the same mouth). Observations within a cluster are not usually independent of each other, as the response from one child of a family, say, may influence the response from another child, because the two grew up together. Matched-pairs are the special case of each cluster having two members.

1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data Repeated categorical responses may come from repeated measurements

Embed Size (px)

Citation preview

Page 1: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

1STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Analyzing Repeated CategoricalResponse Data

Repeated categorical responses may come from repeated measurements over time on each

individual or from a set of measurements that are related

because they belong to the same group or cluster (e.g., measurements made on siblings from the same family, measurements made on a set of teeth from the same mouth).

Observations within a cluster are not usually independent of each other, as the response from one child of a family, say, may influence the response from another child, because the two grew up together.

Matched-pairs are the special case of each cluster having two members.

Page 2: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

2STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Using repeated measures within a cluster can be an efficient way to estimate the mean response at each measurement time without estimating between-cluster variability.

Many times, one is interested in the marginal distribution of the response at each measurement time, and not substantially interested in the correlation between responses across times.

Estimation methods for marginal modeling include maximum likelihood estimation and generalized estimating equations (GEE).

Maximum likelihood estimation is difficult because the likelihood is written in terms of the IT multinomial joint probabilities for T responses with I categories each, but the model applies to the marginal probabilities.

Lang and Agresti give a method for maximum likelihood fitting of marginal models in Section 11.2.5. Modeling a repeated multinomial response or repeated ordinal response is handled in the same way.

Page 3: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

3STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Topics

In Section 11.1 we compare marginal distributions in T-way tables. The remaining sections extend models to include explanatory variables.

In Section 11.2 we use ML methods for fitting marginal models.

In Section 11.3 we use generalized estimating equations (GEE), a multivariate version of quasi-likelihood that is computationally simpler than ML.

Section 11.4 covers technical details about the GEE approach.

In the final section we introduce a transitional approach that models observations in terms of previous outcomes.

Page 4: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

4STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.1 COMPARING MARGINAL DISTRIBUTIONS: MULTIPLE RESPONSES Please review 10.1-10.3. Example: in treating a chronic condition with some

treatment, the primary goal might be to study whether the probability of success increases over the T weeks of a treatment period.

The T success probabilities refer to the T first-order marginal distributions

We want to compare marginal distributions.

Page 5: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

5STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.1.1 Binary Marginal Models and Marginal Homogeneity

T binary responses Marginal logit model

with

All possible outcomes where

Let

the joint distribution of is Mult (n, (1, 2, …, 2^T))

Page 6: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

6STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Marginal homogeneity

Likelihood The likelihood-ratio test of marginal homogeneity

where sample proportions and is maximized likelihood estimate assuming marginal homogeneity.

asymptotic null chi-squared distribution with DF=T-1

Page 7: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

7STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.1.2 Crossover Drug Comparison Example

each subject used each of three drugs for treatment of a chronic condition at three times.

The response measured the reaction as favorable or unfavorable. (binary)

assume that the drugs have no carryover effects and that the severity of the condition remained stable for each subject throughout the experiment.

Page 8: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

8STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Test marginal homogeneity

Sample proportions favorable (n=46)[(6+2+16+4)/46=0.61, 28/46=0.61, 16/46=0.35]for drug A, B, C

Clearly, from the sample proportion, A and B are similar, and better than C

The likelihood-ratio test statistic is 5.95 (DF=2). P-value=0.05.

Page 9: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

9STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

SAS

Page 10: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

10STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

simultaneous confidence intervals

The confidence interval for the true difference is (0.00133, 0.520) between B and C

Page 11: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

11STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

CATMOD

Suppose the dependent variable A has three levels and is the only response-effect in the MODEL statement.

Page 12: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

12STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Design Matrix

p_A=alpha+beta1+beta2 P_B=alpha+beta1 P_C=alpha

Alpha=intercept Beta1=p_B-p_C Beta2=p_A-p_B

Page 13: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

13STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Design Matrix

p_A=parameter1 P_B=parameter2 P_C=parameter3

Analysis of Weighted Least Squares Estimates

Effect Parameter Estimate StandardError

Chi-Square

Pr > ChiSq

Model 1 0.6087 0.0720 71.56 <.0001

  2 0.6087 0.0720 71.56 <.0001

  3 0.3478 0.0702 24.53 <.0001

Page 14: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

14STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.1.3 Modeling Margins of a Multicategory Response Saturated model

marginal homogeneity

Test

Page 15: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

15STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Ordinal response

marginal homogeneity

Test

Model fitting 11.2.5

Page 16: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

16STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.1.4 Wald and Generalized CMH Score Tests of Marginal Homogeneity Similar with paired data in Chapter 10

SAS

Page 17: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

17STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.2 MARGINAL MODELING: MAXIMUM LIKELIHOOD APPROACH

compared marginal distributions, but accounting for explanatory variables.

Page 18: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

18STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Longitudinal Mental Depression Example

comparing a new drug with a standard drug Outcome: mental depression (normal, abnormal) Stratified randomization by severity of depression (was

mild or severe). Four arms n=80, 70, 100, 90 Follow up 1 week, 2 weeks, and 4 weeks

Page 19: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

19STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

explanatory variables: treatment type and severity of initial diagnosis

T=3 12 marginal distributions result from three repeated

observations for each of the four groups. Let s denote the severity of the initial diagnosis, with

s=1 for severe and s=0 for mild. Let d denote the drug, with d=1 for new and d=0 for

standard. Let t denote the time of measurement. Use score (0, 1,

2), the logs to base 2 of the week (1, 2, 4).

Page 20: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

20STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Descriptive statistics (sample proportions)

the sample proportion of normal responses after week 1 for subjects with mild initial diagnosis using the standard drug was

Page 21: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

21STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

data depress;input case diagnose treat time outcome ;

* outcome=1 is normal;

datalines; 1 0 0 0 1 1 0 0 1 1 1 0 0 2 1 2 0 0 0 1 2 0 0 1 1 2 0 0 2 1 3 0 0 0 1 3 0 0 1 1 3 0 0 2 1 4 0 0 0 1 4 0 0 1 1 4 0 0 2 1 5 0 0 0 1 5 0 0 1 1 5 0 0 2 1 6 0 0 0 1 6 0 0 1 1 6 0 0 2 1 7 0 0 0 1 7 0 0 1 1 7 0 0 2 1 8 0 0 0 1 8 0 0 1 1 8 0 0 2 1 9 0 0 0 1 9 0 0 1 1 9 0 0 2 1 10 0 0 0 1 10 0 0 1 1 10 0 0 2 1 11 0 0 0 1 11 0 0 1 1 11 0 0 2 1 12 0 0 0 1 12 0 0 1 1 12 0 0 2 1 13 0 0 0 1 13 0 0 1 1 13 0 0 2 1 14 0 0 0 1 14 0 0 1 1 14 0 0 2 1 15 0 0 0 1 15 0 0 1 1 15 0 0 2 1 16 0 0 0 1 16 0 0 1 1 16 0 0 2 1 17 0 0 0 1 17 0 0 1 1 17 0 0 2 0 18 0 0 0 1 18 0 0 1 1 18 0 0 2 0 19 0 0 0 1 19 0 0 1 1 19 0 0 2 0 20 0 0 0 1 20 0 0 1 1 20 0 0 2 0 21 0 0 0 1 21 0 0 1 1 21 0 0 2 0 22 0 0 0 1 22 0 0 1 1 22 0 0 2 0 23 0 0 0 1 23 0 0 1 1 23 0 0 2 0 24 0 0 0 1 24 0 0 1 1 24 0 0 2 0 25 0 0 0 1 25 0 0 1 1 25 0 0 2 0 26 0 0 0 1 26 0 0 1 1 26 0 0 2 0 27 0 0 0 1 27 0 0 1 1 27 0 0 2 0 28 0 0 0 1 28 0 0 1 1 28 0 0 2 0 29 0 0 0 1 29 0 0 1 1 29 0 0 2 0 30 0 0 0 1 30 0 0 1 0 30 0 0 2 1 31 0 0 0 1 31 0 0 1 0 31 0 0 2 1 32 0 0 0 1 32 0 0 1 0 32 0 0 2 1 33 0 0 0 1 33 0 0 1 0 33 0 0 2 1 34 0 0 0 1 34 0 0 1 0 34 0 0 2 1 35 0 0 0 1 35 0 0 1 0 35 0 0 2 1 36 0 0 0 1 36 0 0 1 0 36 0 0 2 1 37 0 0 0 1 37 0 0 1 0 37 0 0 2 1 38 0 0 0 1 38 0 0 1 0 38 0 0 2 1 39 0 0 0 1 39 0 0 1 0 39 0 0 2 0 40 0 0 0 1 40 0 0 1 0 40 0 0 2 0 41 0 0 0 1 41 0 0 1 0 41 0 0 2 0 42 0 0 0 0 42 0 0 1 1 42 0 0 2 1 43 0 0 0 0 43 0 0 1 1 43 0 0 2 1 44 0 0 0 0 44 0 0 1 1 44 0 0 2 1 45 0 0 0 0 45 0 0 1 1 45 0 0 2 1 46 0 0 0 0 46 0 0 1 1 46 0 0 2 1 47 0 0 0 0 47 0 0 1 1 47 0 0 2 1 48 0 0 0 0 48 0 0 1 1 48 0 0 2 1 49 0 0 0 0 49 0 0 1 1 49 0 0 2 1 50 0 0 0 0 50 0 0 1 1 50 0 0 2 1 51 0 0 0 0 51 0 0 1 1 51 0 0 2 1 52 0 0 0 0 52 0 0 1 1 52 0 0 2 1 53 0 0 0 0 53 0 0 1 1 53 0 0 2 1 54 0 0 0 0 54 0 0 1 1 54 0 0 2 1 55 0 0 0 0 55 0 0 1 1 55 0 0 2 1 56 0 0 0 0 56 0 0 1 1 56 0 0 2 0 57 0 0 0 0 57 0 0 1 1 57 0 0 2 0 58 0 0 0 0 58 0 0 1 1 58 0 0 2 0 59 0 0 0 0 59 0 0 1 1 59 0 0 2 0 60 0 0 0 0 60 0 0 1 0 60 0 0 2 1 61 0 0 0 0 61 0 0 1 0 61 0 0 2 1 62 0 0 0 0 62 0 0 1 0 62 0 0 2 1 63 0 0 0 0 63 0 0 1 0 63 0 0 2 1 64 0 0 0 0 64 0 0 1 0 64 0 0 2 1 65 0 0 0 0 65 0 0 1 0 65 0 0 2 1 66 0 0 0 0 66 0 0 1 0 66 0 0 2 1 67 0 0 0 0 67 0 0 1 0 67 0 0 2 1 68 0 0 0 0 68 0 0 1 0 68 0 0 2 1 69 0 0 0 0 69 0 0 1 0 69 0 0 2 1 70 0 0 0 0 70 0 0 1 0 70 0 0 2 1 71 0 0 0 0 71 0 0 1 0 71 0 0 2 1 72 0 0 0 0 72 0 0 1 0 72 0 0 2 1 73 0 0 0 0 73 0 0 1 0 73 0 0 2 1 74 0 0 0 0 74 0 0 1 0 74 0 0 2 1 75 0 0 0 0 75 0 0 1 0 75 0 0 2 0336 0 0 0 0336 0 0 1 0336 0 0 2 0337 0 0 0 0337 0 0 1 0337 0 0 2 0338 0 0 0 0338 0 0 1 0338 0 0 2 0339 0 0 0 0339 0 0 1 0339 0 0 2 0340 0 0 0 0340 0 0 1 0340 0 0 2 0

76 0 1 0 1 76 0 1 1 1 76 0 1 2 1 77 0 1 0 1 77 0 1 1 1 77 0 1 2 1 78 0 1 0 1 78 0 1 1 1 78 0 1 2 1 79 0 1 0 1 79 0 1 1 1 79 0 1 2 1 80 0 1 0 1 80 0 1 1 1 80 0 1 2 1 81 0 1 0 1 81 0 1 1 1 81 0 1 2 1 82 0 1 0 1 82 0 1 1 1 82 0 1 2 1 83 0 1 0 1 83 0 1 1 1 83 0 1 2 1 84 0 1 0 1 84 0 1 1 1 84 0 1 2 1 85 0 1 0 1 85 0 1 1 1 85 0 1 2 1 86 0 1 0 1 86 0 1 1 1 86 0 1 2 1 87 0 1 0 1 87 0 1 1 1 87 0 1 2 1 88 0 1 0 1 88 0 1 1 1 88 0 1 2 1 89 0 1 0 1 89 0 1 1 1 89 0 1 2 1 90 0 1 0 1 90 0 1 1 1 90 0 1 2 1 91 0 1 0 1 91 0 1 1 1 91 0 1 2 1 92 0 1 0 1 92 0 1 1 1 92 0 1 2 1 93 0 1 0 1 93 0 1 1 1 93 0 1 2 1 94 0 1 0 1 94 0 1 1 1 94 0 1 2 1 95 0 1 0 1 95 0 1 1 1 95 0 1 2 1 96 0 1 0 1 96 0 1 1 1 96 0 1 2 1 97 0 1 0 1 97 0 1 1 1 97 0 1 2 1 98 0 1 0 1 98 0 1 1 1 98 0 1 2 1 99 0 1 0 1 99 0 1 1 1 99 0 1 2 1100 0 1 0 1100 0 1 1 1100 0 1 2 1101 0 1 0 1101 0 1 1 1101 0 1 2 1102 0 1 0 1102 0 1 1 1102 0 1 2 1103 0 1 0 1103 0 1 1 1103 0 1 2 1104 0 1 0 1104 0 1 1 1104 0 1 2 1105 0 1 0 1105 0 1 1 1105 0 1 2 1106 0 1 0 1106 0 1 1 1106 0 1 2 1107 0 1 0 1107 0 1 1 0107 0 1 2 1108 0 1 0 1108 0 1 1 0108 0 1 2 1109 0 1 0 1109 0 1 1 0109 0 1 2 1110 0 1 0 1110 0 1 1 0110 0 1 2 1111 0 1 0 1111 0 1 1 0111 0 1 2 1112 0 1 0 1112 0 1 1 0112 0 1 2 1113 0 1 0 0113 0 1 1 1113 0 1 2 1114 0 1 0 0114 0 1 1 1114 0 1 2 1115 0 1 0 0115 0 1 1 1115 0 1 2 1116 0 1 0 0116 0 1 1 1116 0 1 2 1117 0 1 0 0117 0 1 1 1117 0 1 2 1118 0 1 0 0118 0 1 1 1118 0 1 2 1119 0 1 0 0119 0 1 1 1119 0 1 2 1120 0 1 0 0120 0 1 1 1120 0 1 2 1121 0 1 0 0121 0 1 1 1121 0 1 2 1122 0 1 0 0122 0 1 1 1122 0 1 2 1123 0 1 0 0123 0 1 1 1123 0 1 2 1124 0 1 0 0124 0 1 1 1124 0 1 2 1125 0 1 0 0125 0 1 1 1125 0 1 2 1126 0 1 0 0126 0 1 1 1126 0 1 2 1127 0 1 0 0127 0 1 1 1127 0 1 2 1128 0 1 0 0128 0 1 1 1128 0 1 2 1129 0 1 0 0129 0 1 1 1129 0 1 2 1130 0 1 0 0130 0 1 1 1130 0 1 2 1131 0 1 0 0131 0 1 1 1131 0 1 2 1132 0 1 0 0132 0 1 1 1132 0 1 2 1133 0 1 0 0133 0 1 1 1133 0 1 2 1134 0 1 0 0134 0 1 1 1134 0 1 2 1135 0 1 0 0135 0 1 1 1135 0 1 2 0136 0 1 0 0136 0 1 1 1136 0 1 2 0137 0 1 0 0137 0 1 1 0137 0 1 2 1138 0 1 0 0138 0 1 1 0138 0 1 2 1139 0 1 0 0139 0 1 1 0139 0 1 2 1140 0 1 0 0140 0 1 1 0140 0 1 2 1141 0 1 0 0141 0 1 1 0141 0 1 2 1142 0 1 0 0142 0 1 1 0142 0 1 2 1143 0 1 0 0143 0 1 1 0143 0 1 2 1144 0 1 0 0144 0 1 1 0144 0 1 2 1145 0 1 0 0145 0 1 1 0145 0 1 2 1

146 1 0 0 1146 1 0 1 1146 1 0 2 1147 1 0 0 1147 1 0 1 1147 1 0 2 1148 1 0 0 1148 1 0 1 1148 1 0 2 0149 1 0 0 1149 1 0 1 1149 1 0 2 0150 1 0 0 1150 1 0 1 0150 1 0 2 1151 1 0 0 1151 1 0 1 0151 1 0 2 1152 1 0 0 1152 1 0 1 0152 1 0 2 1153 1 0 0 1153 1 0 1 0153 1 0 2 1154 1 0 0 1154 1 0 1 0154 1 0 2 1155 1 0 0 1155 1 0 1 0155 1 0 2 1156 1 0 0 1156 1 0 1 0156 1 0 2 1157 1 0 0 1157 1 0 1 0157 1 0 2 1158 1 0 0 1158 1 0 1 0158 1 0 2 0159 1 0 0 1159 1 0 1 0159 1 0 2 0160 1 0 0 1160 1 0 1 0160 1 0 2 0161 1 0 0 1161 1 0 1 0161 1 0 2 0162 1 0 0 1162 1 0 1 0162 1 0 2 0163 1 0 0 1163 1 0 1 0163 1 0 2 0164 1 0 0 1164 1 0 1 0164 1 0 2 0165 1 0 0 1165 1 0 1 0165 1 0 2 0166 1 0 0 1166 1 0 1 0166 1 0 2 0167 1 0 0 0167 1 0 1 1167 1 0 2 1168 1 0 0 0168 1 0 1 1168 1 0 2 1169 1 0 0 0169 1 0 1 1169 1 0 2 1170 1 0 0 0170 1 0 1 1170 1 0 2 1171 1 0 0 0171 1 0 1 1171 1 0 2 1172 1 0 0 0172 1 0 1 1172 1 0 2 1173 1 0 0 0173 1 0 1 1173 1 0 2 1174 1 0 0 0174 1 0 1 1174 1 0 2 1175 1 0 0 0175 1 0 1 1175 1 0 2 1176 1 0 0 0176 1 0 1 1176 1 0 2 0177 1 0 0 0177 1 0 1 1177 1 0 2 0178 1 0 0 0178 1 0 1 1178 1 0 2 0179 1 0 0 0179 1 0 1 1179 1 0 2 0180 1 0 0 0180 1 0 1 1180 1 0 2 0181 1 0 0 0181 1 0 1 1181 1 0 2 0182 1 0 0 0182 1 0 1 1182 1 0 2 0183 1 0 0 0183 1 0 1 1183 1 0 2 0184 1 0 0 0184 1 0 1 1184 1 0 2 0185 1 0 0 0185 1 0 1 1185 1 0 2 0186 1 0 0 0186 1 0 1 1186 1 0 2 0187 1 0 0 0187 1 0 1 1187 1 0 2 0188 1 0 0 0188 1 0 1 1188 1 0 2 0189 1 0 0 0189 1 0 1 1189 1 0 2 0190 1 0 0 0190 1 0 1 1190 1 0 2 0191 1 0 0 0191 1 0 1 0191 1 0 2 1192 1 0 0 0192 1 0 1 0192 1 0 2 1193 1 0 0 0193 1 0 1 0193 1 0 2 1194 1 0 0 0194 1 0 1 0194 1 0 2 1195 1 0 0 0195 1 0 1 0195 1 0 2 1196 1 0 0 0196 1 0 1 0196 1 0 2 1197 1 0 0 0197 1 0 1 0197 1 0 2 1198 1 0 0 0198 1 0 1 0198 1 0 2 1199 1 0 0 0199 1 0 1 0199 1 0 2 1200 1 0 0 0200 1 0 1 0200 1 0 2 1201 1 0 0 0201 1 0 1 0201 1 0 2 1202 1 0 0 0202 1 0 1 0202 1 0 2 1203 1 0 0 0203 1 0 1 0203 1 0 2 1204 1 0 0 0204 1 0 1 0204 1 0 2 1205 1 0 0 0205 1 0 1 0205 1 0 2 1206 1 0 0 0206 1 0 1 0206 1 0 2 1207 1 0 0 0207 1 0 1 0207 1 0 2 1208 1 0 0 0208 1 0 1 0208 1 0 2 1209 1 0 0 0209 1 0 1 0209 1 0 2 1210 1 0 0 0210 1 0 1 0210 1 0 2 1211 1 0 0 0211 1 0 1 0211 1 0 2 1212 1 0 0 0212 1 0 1 0212 1 0 2 1213 1 0 0 0213 1 0 1 0213 1 0 2 1214 1 0 0 0214 1 0 1 0214 1 0 2 1215 1 0 0 0215 1 0 1 0215 1 0 2 1216 1 0 0 0216 1 0 1 0216 1 0 2 1217 1 0 0 0217 1 0 1 0217 1 0 2 1218 1 0 0 0218 1 0 1 0218 1 0 2 0219 1 0 0 0219 1 0 1 0219 1 0 2 0220 1 0 0 0220 1 0 1 0220 1 0 2 0221 1 0 0 0221 1 0 1 0221 1 0 2 0222 1 0 0 0222 1 0 1 0222 1 0 2 0223 1 0 0 0223 1 0 1 0223 1 0 2 0224 1 0 0 0224 1 0 1 0224 1 0 2 0225 1 0 0 0225 1 0 1 0225 1 0 2 0226 1 0 0 0226 1 0 1 0226 1 0 2 0227 1 0 0 0227 1 0 1 0227 1 0 2 0228 1 0 0 0228 1 0 1 0228 1 0 2 0229 1 0 0 0229 1 0 1 0229 1 0 2 0230 1 0 0 0230 1 0 1 0230 1 0 2 0231 1 0 0 0231 1 0 1 0231 1 0 2 0232 1 0 0 0232 1 0 1 0232 1 0 2 0233 1 0 0 0233 1 0 1 0233 1 0 2 0234 1 0 0 0234 1 0 1 0234 1 0 2 0235 1 0 0 0235 1 0 1 0235 1 0 2 0236 1 0 0 0236 1 0 1 0236 1 0 2 0237 1 0 0 0237 1 0 1 0237 1 0 2 0238 1 0 0 0238 1 0 1 0238 1 0 2 0239 1 0 0 0239 1 0 1 0239 1 0 2 0240 1 0 0 0240 1 0 1 0240 1 0 2 0241 1 0 0 0241 1 0 1 0241 1 0 2 0242 1 0 0 0242 1 0 1 0242 1 0 2 0243 1 0 0 0243 1 0 1 0243 1 0 2 0244 1 0 0 0244 1 0 1 0244 1 0 2 0245 1 0 0 0245 1 0 1 0245 1 0 2 0

246 1 1 0 1246 1 1 1 1246 1 1 2 1247 1 1 0 1247 1 1 1 1247 1 1 2 1248 1 1 0 1248 1 1 1 1248 1 1 2 1249 1 1 0 1249 1 1 1 1249 1 1 2 1250 1 1 0 1250 1 1 1 1250 1 1 2 1251 1 1 0 1251 1 1 1 1251 1 1 2 1252 1 1 0 1252 1 1 1 1252 1 1 2 1253 1 1 0 1253 1 1 1 1253 1 1 2 0 254 1 1 0 1254 1 1 1 1254 1 1 2 0 255 1 1 0 1255 1 1 1 0255 1 1 2 1256 1 1 0 1256 1 1 1 0256 1 1 2 1257 1 1 0 1257 1 1 1 0257 1 1 2 1258 1 1 0 1258 1 1 1 0258 1 1 2 1259 1 1 0 1259 1 1 1 0259 1 1 2 1260 1 1 0 1260 1 1 1 0260 1 1 2 0261 1 1 0 1261 1 1 1 0261 1 1 2 0262 1 1 0 0262 1 1 1 1262 1 1 2 1263 1 1 0 0263 1 1 1 1263 1 1 2 1264 1 1 0 0264 1 1 1 1264 1 1 2 1265 1 1 0 0265 1 1 1 1265 1 1 2 1266 1 1 0 0266 1 1 1 1266 1 1 2 1267 1 1 0 0267 1 1 1 1267 1 1 2 1268 1 1 0 0268 1 1 1 1268 1 1 2 1269 1 1 0 0269 1 1 1 1269 1 1 2 1270 1 1 0 0270 1 1 1 1270 1 1 2 1271 1 1 0 0271 1 1 1 1271 1 1 2 1272 1 1 0 0272 1 1 1 1272 1 1 2 1273 1 1 0 0273 1 1 1 1273 1 1 2 1274 1 1 0 0274 1 1 1 1274 1 1 2 1275 1 1 0 0275 1 1 1 1275 1 1 2 1276 1 1 0 0276 1 1 1 1276 1 1 2 1277 1 1 0 0277 1 1 1 1277 1 1 2 1278 1 1 0 0278 1 1 1 1278 1 1 2 1279 1 1 0 0279 1 1 1 1279 1 1 2 1280 1 1 0 0280 1 1 1 1280 1 1 2 1281 1 1 0 0281 1 1 1 1281 1 1 2 1282 1 1 0 0282 1 1 1 1282 1 1 2 1283 1 1 0 0283 1 1 1 1283 1 1 2 1284 1 1 0 0284 1 1 1 1284 1 1 2 1285 1 1 0 0285 1 1 1 1285 1 1 2 1286 1 1 0 0286 1 1 1 1286 1 1 2 1287 1 1 0 0287 1 1 1 1287 1 1 2 1288 1 1 0 0288 1 1 1 1288 1 1 2 1289 1 1 0 0289 1 1 1 1289 1 1 2 1290 1 1 0 0290 1 1 1 1290 1 1 2 1291 1 1 0 0291 1 1 1 1291 1 1 2 1292 1 1 0 0292 1 1 1 1292 1 1 2 1293 1 1 0 0293 1 1 1 1 293 1 1 2 0294 1 1 0 0294 1 1 1 1 294 1 1 2 0295 1 1 0 0295 1 1 1 1 295 1 1 2 0296 1 1 0 0296 1 1 1 1 296 1 1 2 0297 1 1 0 0297 1 1 1 1 297 1 1 2 0298 1 1 0 0298 1 1 1 0298 1 1 2 1299 1 1 0 0299 1 1 1 0299 1 1 2 1300 1 1 0 0300 1 1 1 0300 1 1 2 1301 1 1 0 0301 1 1 1 0301 1 1 2 1302 1 1 0 0302 1 1 1 0302 1 1 2 1303 1 1 0 0303 1 1 1 0303 1 1 2 1304 1 1 0 0304 1 1 1 0304 1 1 2 1305 1 1 0 0305 1 1 1 0305 1 1 2 1306 1 1 0 0306 1 1 1 0306 1 1 2 1307 1 1 0 0307 1 1 1 0307 1 1 2 1308 1 1 0 0308 1 1 1 0308 1 1 2 1309 1 1 0 0309 1 1 1 0309 1 1 2 1310 1 1 0 0310 1 1 1 0310 1 1 2 1311 1 1 0 0311 1 1 1 0311 1 1 2 1312 1 1 0 0312 1 1 1 0312 1 1 2 1313 1 1 0 0313 1 1 1 0313 1 1 2 1314 1 1 0 0314 1 1 1 0314 1 1 2 1315 1 1 0 0315 1 1 1 0315 1 1 2 1316 1 1 0 0316 1 1 1 0316 1 1 2 1317 1 1 0 0317 1 1 1 0317 1 1 2 1318 1 1 0 0318 1 1 1 0318 1 1 2 1319 1 1 0 0319 1 1 1 0319 1 1 2 1320 1 1 0 0320 1 1 1 0320 1 1 2 1321 1 1 0 0321 1 1 1 0321 1 1 2 1322 1 1 0 0322 1 1 1 0322 1 1 2 1323 1 1 0 0323 1 1 1 0323 1 1 2 1324 1 1 0 0324 1 1 1 0324 1 1 2 1325 1 1 0 0325 1 1 1 0325 1 1 2 1326 1 1 0 0326 1 1 1 0326 1 1 2 1327 1 1 0 0327 1 1 1 0327 1 1 2 1328 1 1 0 0328 1 1 1 0328 1 1 2 1329 1 1 0 0329 1 1 1 0329 1 1 2 1330 1 1 0 0330 1 1 1 0330 1 1 2 0331 1 1 0 0331 1 1 1 0331 1 1 2 0332 1 1 0 0332 1 1 1 0332 1 1 2 0333 1 1 0 0333 1 1 1 0333 1 1 2 0334 1 1 0 0334 1 1 1 0334 1 1 2 0335 1 1 0 0335 1 1 1 0335 1 1 2 0;

proc sort; by diagnose treat time;

proc means n mean std; class diagnose treat time; var outcome; run;

Page 22: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

22STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

The sample proportion of normal responses increased over time for each group; increased at a faster rate for the new drug than the

standard, for each fixed initial diagnosis; and was higher for the mild than the severe initial

diagnosis, for each treatment at each occasion. The company would hope to show that patients have a

significantly higher rate of improvement with the new drug.

Page 23: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

23STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Modeling

The marginal logit model 1 (main effects model)

Time (t) is continuous The natural sampling assumption is multinomial for the

eight cells in the 23 cross-classification of the three responses

A check of model fit compares the 32 cell counts in Table 11.2 to their ML fitted values. Since the model describes 12 marginal logits using four parameters, residual df=8. The deviance G2=34.6.

Lack of fit, since model assumes a common rate of improvement (should be higher for new drug)

Page 24: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

24STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Model 2

Page 25: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

25STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

For each drug-time combination, the estimated odds of a normal response when the initial diagnosis was severe equal exp(-1.29)=0.27 times the estimated odds when the initial diagnosis was mild.

The estimate indicates an insignificant difference between the drugs after 1 week.

At time t, the estimated odds of normal response with the new drug are exp(-0.06+1.01 t) times the estimated odds for the standard drug, for each initial diagnosis level.

Conclusion: severity of initial diagnosis, drug treatment, and time all have substantial effects on the probability of a normal response.

Page 26: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

26STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.2.2 Modeling a Repeated Multinomial Response

At observation t, the marginal response distribution has I-1 logits.

nominal responses, baseline-category logit models describe the odds of each outcome relative to a baseline.

For ordinal responses, one might use cumulative logit models.

checking for interaction is crucial.

Page 27: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

27STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.2.3 Insomnia Example randomized, double-blind clinical trial comparing an

active hypnotic drug with a placebo in patients who have insomnia problems.

response is the patient’s reported time in minutes to fall asleep after going to bed.

Page 28: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

28STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Proportional odds model

Sample marginal distributions

proc sort; by treat time;

proc freq; tables treat*time*outcome /nocol NOFREQ NOPERCENT; run;

Page 29: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

29STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

ML model fitting

G2=8.0 (df=6)

shows evidence of interaction At the initial observation, the estimated odds that time

to falling asleep for the active treatment is below any fixed level equal exp(0.046)=1.04 times the estimated odds for the placebo treatment;

at the follow-up observation, the effect is exp(0.046+0.662)=2.03.

In other words, initially the two groups had similar distributions, but at the follow-up those with the active treatment tended to fall asleep more quickly.

Follow-up with placebo or treatment, both tended to fall sleep more quickly (exp(1.07)=2.9)

Page 30: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

30STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.2.4 Comparisons That Control for Initial Response

Model assumption: the marginal distributions for initial response are identical for the treatment groups.

This is true if random assignment of subjects to the groups (one of the principles in experimental design: randomization, other two: replication, blocking)

If the initial marginal distributions are not identical, however, the difference between follow-up and initial marginal distributions may differ between treatment groups, even though their conditional distributions for follow-up response are identical.

In such cases, although marginal models can be useful, they may not tell the entire story. It may be more informative to construct models that compare the follow-up responses while controlling for the initial response.

Page 31: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

31STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

transitional model

Let Y2 denote the follow-up response, for treatment x with initial response y1.

Page 32: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

32STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

11.2.5 ML Fitting of Marginal Logit Models*

For T observations on an I-category response, at each setting of predictors the likelihood refers to IT

multinomial joint probabilities, but the model applies to T sets of marginal multinomial parameters

The marginal multinomial variates are not independent. Marginal logit models have the generalized loglinear

model form

where denote the complete set of multinomial joint probabilities for all settings of predictors.

Page 33: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

33STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Example, model (11.1)

the model of marginal homogeneity (T=2)

Page 34: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

34STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

likelihood

The likelihood function for a marginal logit model is the product of the multinomial mass functions from the various predictor settings.

Usually, no continuous predictor is allowed

if U denote a full column rank matrix such that the space spanned by the columns of U is the orthogonal complement of the space spanned by the columns of X.

maximizing the likelihood incorporates these model constraints as well as identifiability constraints

Page 35: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

35STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

ML

Joseph Lang ( [email protected]) has R and S-Plus functions for ML fitting of marginal models through the generalized loglinear model (11.8), using the constraint approach with Lagrange multipliers.http://www.stat.uiowa.edu/~jblang/mph.fitting/mph.fit.documentation.2.0.htm

The program MAREG (Kastner et al. 1997) provides GEE fitting and ML fitting of marginal models with the Fitzmaurice and Laird (1993) approach, allowing multicategory responses.

Page 36: 1 STA 617 – Chp11 Models for repeated data Analyzing Repeated Categorical Response Data  Repeated categorical responses may come from  repeated measurements

36STA 617 – Chp11 STA 617 – Chp11 Models for repeated dataModels for repeated data

Generalized Estimating Equation (GEE)