This function summarizes both the stepwise selection process of the model fitting by heft, as well as the final model that was selected using AIC/BIC.

# S3 method for class 'heft'
summary(object, ...) 
# S3 method for class 'heft'
print(x, ...)

Arguments

object,x

heft object, typically the result of heft.

...

other arguments are ignored.

Details

These function produce identical printed output. The main body is a table with six columns:

the first column is a possible number of knots for the fitted model;

the second column is 0 if the model was fitted during the addition stage and 1 if the model was fitted during the deletion stage;

the third column is the log-likelihood for the fit;

the fourth column is -2 * loglikelihood + penalty * (dimension), which is the AIC criterion - heft selected the model with the minimum value of AIC;

the fifth and sixth columns give the endpoints of the interval of values of penalty that would yield the model with the indicated number of knots. (NAs imply that the model is not optimal for any choice of penalty.)

At the bottom of the table the number of knots corresponding to the selected model is reported, as are the value of penalty that was used and the coefficients of the log-based terms in the fitted model and their standard errors.

References

Charles Kooperberg, Charles J. Stone and Young K. Truong (1995). Hazard regression. Journal of the American Statistical Association, 90, 78-94.

Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371–1470.

Author

Charles Kooperberg clk@fredhutch.org.

Examples

fit1 <- heft(testhare[,1], testhare[,2])
summary(fit1)
#>  knots A(0)/D(1)   loglik     AIC minimum penalty maximum penalty
#>      3         1 -2954.28 5931.37           82.52             Inf
#>      4         0 -2913.02 5856.45            2.79           82.52
#>      5         0 -2912.87 5863.75              NA              NA
#>      6         1 -2910.63 5866.87              NA              NA
#>      7         1 -2910.36 5873.92              NA              NA
#>      8         1 -2907.45 5875.71            2.64            2.79
#>      9         1 -2906.50 5881.40              NA              NA
#>     10         1 -2905.58 5887.16              NA              NA
#>     11         1 -2903.97 5891.54              NA              NA
#>     12         1 -2902.83 5896.87              NA              NA
#>     13         1 -2900.86 5900.53            1.68            2.64
#>     14         1 -2900.64 5907.69              NA              NA
#>     15         1 -2899.18 5912.37            0.75            1.68
#>     16         1 -2899.17 5919.95              NA              NA
#>     17         1 -2898.45 5926.11              NA              NA
#>     18         1 -2898.40 5933.62              NA              NA
#>     19         1 -2897.68 5939.78            0.37            0.75
#>     20         1 -2897.50 5947.01            0.20            0.37
#>     21         1 -2897.49 5954.60              NA              NA
#>     22         1 -2897.30 5961.82            0.05            0.20
#>     23         0 -2897.28 5969.37            0.00            0.05
#> the present optimal number of knots is  4 
#> penalty(AIC) was the default: BIC=log(samplesize): log( 2000 )= 7.6 
#>            theta   SE     t
#> left tail   1.01 0.09 11.01
#> right tail -1.00   NA    NA
# modify tail behavior
fit2 <- heft(testhare[,1], testhare[,2], leftlog = FALSE, rightlog = FALSE, 
    leftlin = TRUE)   
summary(fit2)
#>  knots A(0)/D(1)   loglik     AIC minimum penalty maximum penalty
#>      2         0 -3008.39 6024.39           86.12             Inf
#>      3         0 -2995.90 6007.00              NA              NA
#>      4         1 -2922.28 5867.36           13.67           86.12
#>      5         0 -2915.45 5861.29            5.92           13.67
#>      6         1 -2913.17 5864.34              NA              NA
#>      7         0 -2912.23 5870.07              NA              NA
#>      8         1 -2906.57 5866.35            2.81            5.92
#>      9         1 -2906.37 5873.54              NA              NA
#>     10         1 -2903.76 5875.94            1.46            2.81
#>     11         1 -2903.40 5882.80              NA              NA
#>     12         1 -2902.76 5889.12              NA              NA
#>     13         1 -2902.33 5895.87              NA              NA
#>     14         1 -2901.60 5902.00              NA              NA
#>     15         1 -2901.05 5908.52              NA              NA
#>     16         1 -2899.72 5913.45              NA              NA
#>     17         1 -2899.31 5920.23              NA              NA
#>     18         1 -2897.91 5925.04            0.85            1.46
#>     19         1 -2897.49 5931.79            0.23            0.85
#>     20         1 -2897.38 5939.17            0.05            0.23
#>     21         1 -2897.36 5946.74              NA              NA
#>     22         1 -2897.33 5954.27            0.02            0.05
#>     23         0 -2897.32 5961.85            0.00            0.02
#> the present optimal number of knots is  5 
#> penalty(AIC) was the default: BIC=log(samplesize): log( 2000 )= 7.6 
#>            theta SE  t
#> left tail      0 NA NA
#> right tail     0 NA NA
fit3 <- heft(testhare[,1], testhare[,2], penalty = 0)   # select largest model
summary(fit3)
#>  knots A(0)/D(1)   loglik     AIC minimum penalty maximum penalty
#>      3         0 -2954.28 5908.56           82.52             Inf
#>      4         0 -2913.02 5826.05            2.48           82.52
#>      5         0 -2912.87 5825.75              NA              NA
#>      6         0 -2912.36 5824.72              NA              NA
#>      7         0 -2911.57 5823.14              NA              NA
#>      8         0 -2909.73 5819.46              NA              NA
#>      9         0 -2907.57 5815.14              NA              NA
#>     10         0 -2906.92 5813.84              NA              NA
#>     11         0 -2904.50 5809.00              NA              NA
#>     12         0 -2903.10 5806.20            1.84            2.48
#>     13         0 -2902.18 5804.35            1.10            1.84
#>     14         0 -2901.63 5803.25            0.99            1.10
#>     15         0 -2901.24 5802.47              NA              NA
#>     16         0 -2900.94 5801.89              NA              NA
#>     17         0 -2900.62 5801.23              NA              NA
#>     18         0 -2899.82 5799.64              NA              NA
#>     19         0 -2899.18 5798.35              NA              NA
#>     20         0 -2898.65 5797.29            0.91            0.99
#>     21         0 -2898.42 5796.85              NA              NA
#>     22         0 -2897.94 5795.89              NA              NA
#>     23         0 -2897.28 5794.55            0.00            0.91
#> the present optimal number of knots is  23 
#> penalty(AIC) was  0 , the default (BIC)  would have been 7.6 
#> models with fewer than 3 knots can be fitted, but they are not optimal for the
#> present choice of penalty - choose penalty in heft larger to see these fits
#>            theta   SE    t
#> left tail   0.20 0.53 0.38
#> right tail -0.66 0.55 1.20