wc_fit: Wang-Chang survival estimator

View source: R/wc_fit.R

wc_fitR Documentation

Wang-Chang survival estimator

Description

Estimates the survival function of correlated or i.i.d. inter-occurrence times of recurrent event data with the product-limit estimator of Wang and Chang (1999).

Usage

wc_fit(x, tvals)

Arguments

x

a survival recurrent event object, see Survr().

tvals

optional vector of times at which the survival function is also evaluated.

Details

Wang and Chang (1999) proposed an estimator of the common marginal survivor function for the case where within-unit inter-occurrence times are correlated. The correlation structure they considered is quite general and contains both the i.i.d. and the multiplicative (hence gamma) frailty model as special cases.

This estimator removes the bias noted for the product-limit estimator of Peña, Strawderman and Hollander (2001) when inter-occurrence times are correlated within units. However, when applied to i.i.d. inter-occurrence times it is not expected to perform as well as the PSH estimator, especially with regard to efficiency.

Value

A list with class survfitr containing:

n

number of units or subjects observed.

m

number of events of each subject.

failed

uncensored gap times, ordered by subject.

censored

censored gap time of each subject.

time

ordered distinct event times.

n.event

weighted number of events at each distinct time.

AtRisk

weighted number of units at risk at each distinct time.

survfunc

survival estimate at each distinct time.

std.error

standard error of the survival estimate.

tvals

copy of the tvals argument.

WCpleAttvals

survival estimate at the tvals times.

Note

The maintainers wish to thank Professors Chiung-Yu Huang and Shu-Hui Chang for providing the original Fortran code computing the standard errors of Wang and Chang's estimator.

References

Wang, M.-C. and Chang, S.-H. (1999). Nonparametric Estimation of a Recurrent Survival Function. Journal of the American Statistical Association 94, 146–153.

See Also

survfitr(), Survr()

Examples

data(MMC)
fit <- wc_fit(Survr(MMC$id, MMC$time, MMC$event))
fit
plot(fit, conf.int = FALSE)

# compare with Peña-Strawderman-Hollander
fit <- psh_fit(Survr(MMC$id, MMC$time, MMC$event))
lines(fit, lty = 2)

# and with the gamma frailty MLE
fit <- mlefrailty_fit(Survr(MMC$id, MMC$time, MMC$event))
lines(fit, lty = 3)

survrec documentation built on Sept. 22, 2026, 9:07 a.m.