vcov.fitfrail: Compute variance/covariance matrix for fitfrail model

Description Usage Arguments Value See Also Examples

View source: R/vcov.fitfrail.R

Description

Compute the variance/covariance matrix for fitfrail estimated parameters. This can be performed by a an asymptotically-normal and consistent variance estimator or a weighted bootstrap. The resulting covariance matrix is cached in the fitted object and later retrieved if the same arguments to vcov.fitfrail are supplied.

Usage

1
2
## S3 method for class 'fitfrail'
vcov(object, boot=FALSE, B=100, Lambda.times=NULL, cores=0, ...)

Arguments

object

a fitfrail object

boot

logical value, whether to use a weighted bootstrap. If boot == FALSE, a consistent estimator is used and the cumulative baseline hazard variance will not be estimated.

B

number of repetitions in the weighted bootstrap.

Lambda.times

time points where the variance/covariance should be evaluated. If Lambda.times == NULL, then the points where the cumulative baseline hazard increases (where failures occur) are used.

cores

number of cores to use when computing the covariance matrix in parallel

...

extra arguments are not used

Value

variance/covariance matrix for the fitfrail model parameters

See Also

fitfrail

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
dat <- genfrail(N=200, K=2, beta=c(log(2),log(3)), 
                frailty="gamma", theta=2,
                censor.rate=0.35,
                Lambda_0=function(t, tau=4.6, C=0.01) (C*t)^tau)

fit <- fitfrail(Surv(time, status) ~ Z1 + Z2 + cluster(family), 
                dat, frailty="gamma")

# boot=TRUE will give the weighted bootstrap variance estimates
COV <- vcov(fit, boot=FALSE)
COV

## End(Not run)

frailtySurv documentation built on Aug. 29, 2018, 1:04 a.m.