Learn R Programming

intercure (version 0.1.0)

inter_bch: Fits promotion time cure rate model for interval censored data

Description

inter_bch returns a list with the estimated parameters par and their asymptotic covariance matrix mcov. The list also contains a dummy variable stop_c assuming 0 if algorithm converged and 1 if a stop criteria ended the process.

Usage

inter_bch(dataset, left, right, cov, sigma = 10, crit_theta = 0.001, crit_p = 0.005, max_n = 100, output_files = FALSE)

Arguments

dataset
Dataset used to fit the model.
left
Vector containing the last check times before event.
right
Vector containing the first check times after event.
cov
String vector containing the column names to be used on the cure rate predictor.
sigma
Parameter for the primal-dual interior-point algorithm used on the maximization process. Default value set to 10.
crit_theta
The effects minimum error for convergence purposes.
crit_p
Minimum error of the non-parametric cumulative distribution function.
max_n
Maximum number of iterations of the ECM algorithm.
output_files
Boolean indicating if text outputs for the estimates and variances should be generated.

Value

The inter_bch function returns an list containing the following outputs:
par
estimates of theta parameters.
mcov
estimates for the asymptotic covariance matrix of theta parameters.
stop_c
stop criteria indicator assuming 1 when process is stopped for a non-convergence criteria. Assumes 0 when convergence is reached.

Examples

Run this code
set.seed(3)
sample_set <- sim_bch(80)

## few iterations just to check how to use the function

inter_bch(sample_set, sample_set$L,
sample_set$R, c("xi1","xi2"), max_n = 5)

## precise estimate (computationally intensive)
## Not run: 
# 
# inter_bch(sample_set, sample_set$L, sample_set$R, c("xi1","xi2"))
# ## End(Not run)

Run the code above in your browser using DataLab