inter_frailty_cl: Cure rate frailty model for interval censored clustered data

Description Usage Arguments Value Examples

Description

inter_frailty_cl returns a list with the estimated parameters par and their 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
3
inter_frailty_cl(dataset, left, right, delta, cov_theta, cov_beta, grp, M,
  b = 0.001, tol = 0.001, max_n = 100, par_cl = NULL, burn_in = 50,
  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.

delta

Flag vector indicating failure inside interval.

cov_theta

String vector containing the column names to be used on the cure rate predictor.

cov_beta

String vector containing the column names to be used on the predictor associated with the hazard function.

grp

Vector containing cluster identifier (numeric or string).

M

Number of replicates generated by each iteration on the ANDA (Asymptotic Normal Data Augmentation) algorithm.

b

Parameter for initial theta and beta variances.

tol

Numeric for tolerance of convergence.

max_n

Maximum number of algorithm's iterations without the burn in.

par_cl

Registered SOCK cluster for parallel process. If NULL (default) the program loops are executed sequentially.

burn_in

Number of burn in iterations.

output_files

Boolean indicating if text outputs for the estimates and variances should be generated.

Value

The inter_frailty_cl function returns an list containing the following outputs:

par

estimates of theta and beta parameters.

mcov

estimates for the covariance matrix of theta and beta 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
15
16
17
set.seed(3)
sample_set <- sim_frailty_cl(80, nclus = 3)

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

inter_frailty_cl(sample_set, sample_set$L, sample_set$R, sample_set$delta,
c("xi1"), c("xi1"), grp = sample_set$clus, M = 20,
max_n = 2, burn_in = 0)

## precise estimate (computationally intensive)
## Not run: 

inter_frailty_cl(sample_set, sample_set$L, sample_set$R, sample_set$delta,
c("xi1", "xi2"), c("xi1", "xi2"), grp = sample_set$clus, M = 20,
max_n = 30, burn_in = 10)

## End(Not run)

intercure documentation built on May 2, 2019, 5:33 a.m.