cv_sieveSurv: Nonparametrically estimate the survival function using...

Description Usage Arguments Value

View source: R/cv_sieveSurv.R

Description

Nonparametrically estimate the survival function using B-spline sieves (for use with cross-validation)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
cv_sieveSurv(
  time,
  event,
  covar = NULL,
  bspline,
  data,
  tol = 1e-04,
  max_iter = 1000,
  assume_last = FALSE
)

Arguments

time

Column name for follow-up time

event

Column name for event indicators

covar

(Optional) column name(s) for additional fully-observed covariates. Default is covar=NULL, which estimates unconditional survival.

bspline

Column names for B-spline basis.

data

Dataframe or matrix containing (at least) named columns time, event, covar, and bspline.

tol

Tolerance to define convergence. Default is tol=1E-4.

max_iter

Maximum number of iterations allowed for the EM algorithm. Default is max_iter = 1000.

assume_last

Assume last observed time is an event (for use when the integration of the survival function is desired). Default is FALSE.

Value

A list with the following elements:

bspline_coeff

the values of the B-spline coefficients at convergence

conv

indicator of convergence for the EM algorithn

conv_msg

description of nonconvergence if conv = FALSE


sarahlotspeich/sieveSurv documentation built on Feb. 14, 2022, 5:10 a.m.