Learn R Programming

SemiCompRisks (version 2.4)

FreqSurv: The function to fit parametric Weibull models for the frequentist analysis of univariate survival data.

Description

Independent univariate right-censored survival data can be analyzed using hierarchical models.

Usage

FreqSurv(Y, lin.pred, data)

Arguments

Y
a data.frame containing univariate time-to-event outcomes from n subjects. It is of dimension $n\times 2$: the columns correspond to $y$, $\delta$.
lin.pred
a formula object that corresponds to $h$.
data
a data.frame in which to interpret the variables named in the formula in lin.pred.

Value

  • FreqSurv returns an object of class Freq.

Details

See BayesSurv for a detailed description of the models.

References

Lee, K. H., Haneuse, S., Schrag, D., and Dominici, F. (2015), Bayesian semiparametric analysis of semicompeting risks data: investigating hospital readmission after a pancreatic cancer diagnosis, Journal of the Royal Statistical Society: Series C, 64, 2, 253-273.

See Also

print.Freq, summary.Freq, plot.Freq, BayesSurv.

Examples

Run this code
# loading a data set	
data(survData)
Y <- survData[,c(1,2)]
lin.pred <- as.formula( ~ cov1 + cov2)

fit_WB <- FreqSurv(Y, lin.pred, data=survData)
fit_WB
summ.fit_WB <- summary(fit_WB); names(summ.fit_WB)
summ.fit_WB
plot(fit_WB, tseq=seq(from=0, to=30, by=5))
plot(fit_WB, tseq=seq(from=0, to=30, by=5), plot.est = "BH")
names(fit_WB.plot <- plot(fit_WB, tseq=seq(0, 30, 5), plot=FALSE))

Run the code above in your browser using DataLab