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

Description Usage Arguments Value Examples

View source: R/inter_bch.R

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

1
2
inter_bch(dataset, left, right, cov, sigma = 10, crit_theta = 0.001,
  crit_p = 0.005, crit_lh = 0.3, 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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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)

JBrettas/intercure documentation built on May 7, 2019, 7:39 a.m.