Hypothesis Tests

PROC LIFEREG is somewhat skimpy in its facilities for hypothesis tests. It routinely reports chi-square tests for the hypothesis that each of the coefficients is 0. These are Wald tests that are calculated simply by dividing each coefficient by its estimated standard error and squaring the result. For models like the exponential that restrict the scale parameter to be 1.0, PROC LIFEREG reports a Lagrange multiplier chi-square statistic (also known as a score statistic) for the hypothesis that the parameter is, indeed, equal to 1.0. Finally, as we’ve seen, for categorical variables named in a CLASS statement, PROC LIFEREG gives a Wald chi-square statistic for the null hypothesis that all the coefficients associated with the variable are 0.

To test other hypotheses, you have to construct the appropriate statistic yourself. Before describing how to do this, I’ll first present some background. For all the regression models considered in this book, there are three general methods for constructing test statistics: Wald statistics, score statistics, and likelihood ratio statistics. Wald statistics are calculated using certain functions (quadratic forms) of parameter estimates and their estimated variances and covariances. Score statistics are based on similar functions of the first and second derivatives of the likelihood function. Finally, likelihood-ratio statistics are calculated by maximizing the likelihood twice: under the null hypothesis and with the null hypothesis relaxed. The statistic is then twice the positive difference in the two log-likelihoods.

You can use all three methods to test the same hypotheses, and all three produce chi-square statistics with the same number of degrees of freedom. Furthermore, they are asymptotically equivalent, meaning that their approximate large-sample distributions are identical. Hence, asymptotic theory gives no basis for preferring one method over another. There is some evidence that likelihood-ratio statistics may more closely approximate a chi-square distribution in small to moderate sized samples, however, and some authors (e.g., Collett 1994) express a strong preference for these statistics. On the other hand, Wald tests and score tests are often more convenient to calculate because they don’t require re-estimation of the model for each hypothesis tested.

Let’s first consider a likelihood-ratio test of the null hypothesis that all the covariates have coefficients of 0. This is analogous to the usual F-test that is routinely reported for linear regression models. (Many authorities hold that if this hypothesis is not rejected, then there is little point in examining individual coefficients for statistical significance.) To calculate this statistic, we need only to fit a null model that includes no covariates. For a Weibull model, we can accomplish that with the following statement:

model week*arrest(0)= / dist=weibull;

For the recidivism data, this produces a log-likelihood of –338.59. By contrast, the Weibull model with seven covariates displayed in Output 4.3 has a log-likelihood of –321.85. Taking twice the positive difference between these two values yields a chi-square value of 33.48. With seven degrees of freedom (the number of covariates excluded from the null model), the p-value is less than .001. So we reject the null hypothesis and conclude that at least one of the coefficients is nonzero.

You can also test the same hypothesis with a Wald statistic, but that involves the following steps: (1) request that the parameter estimates and their covariance matrix be written to a SAS data set; (2) read that data set into PROC IML, the SAS matrix algebra procedure; (3) use PROC IML to perform the necessary matrix calculations. (These calculations include inverting the appropriate submatrix of the covariance matrix, and premultiplying and postmultiplying that matrix by a vector containing appropriate linear combinations of the coefficients). That’s clearly a much more involved procedure. Furthermore, PROC LIFEREG will not write the parameter estimates to a data set if there are any CLASS variables in the model. That’s unfortunate because testing hypotheses about CLASS variables is one of the more frequently needed applications.

Wald statistics for testing equality of any two coefficients are simple to calculate. The method is particularly useful for doing post-hoc comparisons of the coefficients of CLASS variables. Earlier we used a CLASS statement to include a three-category education variable in the model. As shown in Output 4.7, there is one chi-square test comparing category 3 with category 5, and another chi-square test comparing category 4 with category 5. But there is no test reported for comparing category 3 with category 4. The appropriate null hypothesis is that β3=β4, where the subscripts refer to the values of categories. A Wald chi-square for testing this hypothesis can be computed by

Equation 4.5


The (estimated) variances and covariances in the denominator are easily obtained from the covariance matrix that was requested in the MODEL statement. Output 4.8 shows a portion of the printed matrix. In this printout, EDUC.l and EDUC.2 refer to categories 3 and 4, respectively.

Output 4.8. A Portion of the Covariance Matrix for a Model with a CLASS Variable
L I F E R E G  P R O C E D U R E

                    Estimated Covariance Matrix

                           EDUC.l        EDUC.2        SCALE

           INTERCPT     -0.094637     -0.090901     0.003377
                FIN     -0.000920     -0.001186     0.001338
                AGE      0.000137      0.000285     0.000202
               RACE      0.002250     -0.003371    -0.001341
               WEXP      0.002200     -0.001100     0.000398
                MAR      0.000551      0.000826     0.001593
               PARO     -0.000617      0.000704     0.000383
               PRIO     -0.000593     -0.000131    -0.000260
             EDUC.1      0.095495      0.086663    -0.002738
             EDUC.2      0.086663      0.105149    -0.001756
              SCALE     -0.002738     -0.001756     0.004019

Var is found to be .095495 at the intersection of EDUC.l with itself, and similarly Var is .105149 at the intersection of EDUC.2 with itself. The covariance is .086663 at the intersection of EDUC.l and EDUC.2. Combining these numbers with the coefficient estimates in Output 4.7, we get

With 1 degree of freedom, the chi-square value is far from the .05 critical value of 3.84. We conclude that there is no difference in the time to arrest between those with 9th grade or less and those with 10th or 11th grade education. This should not be surprising since the overall chi-square test is not significant, nor is the more extreme comparison of category 3 with category 5. Of course, when performing post-hoc comparisons like this, it is generally advisable to adjust the alpha level for multiple comparisons. (The simplest approach is the well-known Bonferroni method: For k tests and an overall Type I error rate of α, each test uses α/k as the criterion value).

We can also test the hypothesis that β3= β4 with the likelihood ratio statistic. To do that, we must reestimate the model while imposing the constraint that β3= β4. We can accomplish this reestimate by recoding the education variable so that levels 3 and 4 have the same value. For example, the DATA step can contain a statement like

if educ = 3 then educ = 4;

When I estimated the model with this recoding, the log-likelihood was –317.97, compared with –317.50 with the original coding. Twice the positive difference is .94, which, again, is far from statistically significant.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.254.35