varest2 function

Variance estimate with sandwich formula based on the EM algorithm

Variance estimate with sandwich formula based on the EM algorithm

Calculate the variance estimates using the sandwich formula based on the EM algorithm.

varest2(Time, Status, X, Z, id, gamma, beta, bsurv, w)

Arguments

  • Time: right censored data which is the follow up time.
  • Status: the censoring indicator, normally 0 = event of interest happens, and 0 = censoring.
  • X: a matrix of covariates corresponding to the latency part.
  • Z: a matrix of covariates corresponding to the incidence part.
  • id: a vector which identifies the clusters. The length of id should be the same as the number of observations.
  • gamma: the estimates for the incidence part.
  • beta: the estimates for the latency part.
  • bsurv: the estimate of the baseline survival function for the latency part.
  • w: conditional probability of a patient remains uncured.
  • Maintainer: Yi Niu
  • License: GPL (>= 2)
  • Last published: 2018-04-01

Useful links