agreg(start, stop, event, x, strata=rep(1, length(start)), wt= rep(1, length(start)), resid="none", init=rep(0, ncol(x)), eps=0.0001, iter.max=10, table=T, inf.ratio=2000)
The proportional hazards model is usually expressed in terms of a single survival time value for each person, with possible censoring. Andersen and Gill reformulated the same problem as a counting process; as time marches onward we observe the events for a subject, rather like watching a Geiger counter. Extensions to the Cox model are readily apparent: time dependent covariates, multiple events, and discontinuous observation periods for a single subject. A martingale formulation of the counting process leads to direct proofs of asymptotic properties, and to a useful set of residuals.
One use of risk weights is to set certain coeficients at a fixed value, much like the offset statement of a generalized linear model (see glim). Assume that the coeficients for say, age and sex, have been fixed from an outside study, perhaps national death rates, and we wish to adjust for them without estimating the terms. Then a weight of exp(beta1*age+beta2*sex) would be used.
Fleming, T. R. and Harrington, D. P. (1991). Counting Processes and Survival Analysis. Wiley, New York.
Therneau, T., Grambsch, P. and Fleming, T. (1990). Martingale-based residuals for survival models. Biometrika 77, 147-160.
xx24 <- agreg(heart$start, heart$stop, heart$event, xx[, c(2,4)]) print(xx24) # nice printout of results.