bootbiascorrect {CPsurv}R Documentation

Implements Bootstrap Bias Correction

Description

Implements Bootstrap Bias Correction

Usage

bootbiascorrect(changeP, time, event, censoring, censpoint, intwd, cpmax, cpmin,
  norm.riskset, B.correct, parametric, times.int, opt.start)

Arguments

changeP

Estimated change point.

time

Numeric vector with survival times.

event

Numeric vector indicating censoring status; 0 = alive (censored), 1 = dead (uncensored). If missing, all observations are assumed to be uncensored.

censoring

Type of right-censoring for simulated data on which the bootstrap bias correction is based. Possible types are "random" for random censoring (default), "type1" for Type I censoring or "no" for data without censored observations. Because simulated data should be similar to given data, the censoring type is adapted from vector 'events' if given and argument 'censoring' is ignored than.

censpoint

Point of Type I censoring; if missing, minimum time after which all events are equal to 0 is used. Censpoint is only needed for bootstrap bias correction.

intwd

Width of intervals into which the time period is split; default is ceiling(cpmax/20). Has to be an integer value.

cpmax

Upper bound for estimated change point. Time period is split into intervals up to this point. Has to be an integer value.

cpmin

Lower bound for estimated change point; default is cpmin=0. Has to be an integer value.

norm.riskset

Logical; if TRUE normalized number of units at risk is used within an interval.

B.correct

Number of bootstrap samples for bias correction; defaults to 49.

parametric

Logical; if TRUE parametric bootstrap bias correction is used (simulation of boostrap samples is based on estimated Weibull parameters); otherwise Kaplan-Meier is used for a nonparametric bootstrap bias correction.

times.int

Logical; if TRUE simulated survival times are integers.

opt.start

Numeric vector of length two; initial values for the Weibull parameters (shape and scale parameters) to be optimized if parametric bootstrap bias correction is used.

Value

A list with bias-corrected change point and optional estimated shape and scale parameters of the Weibull distribution.


[Package CPsurv version 1.0.0 Index]