calibration {CaseCohortCoxSurvival}R Documentation

calibration

Description

Calibrates the design weights using the raking procedure.

Usage

 calibration(A.phase2, design.weights, total, eta0 = NULL, niter.max = NULL, 
            epsilon.stop = NULL)

Arguments

A.phase2

matrix with the values of the q auxiliary variables to be used for the calibration of the weights in the case-cohort (phase-two data).

design.weights

design weights to be calibrated.

total

vector of length q with un-weighted auxiliary variable totals in the whole cohort.

eta0

vector of length q with initial values for eta (the Lagrangian multipliers), to be used as seed in the iterative procedure. Default is (0, ... ,0).

niter.max

maximum number of iterations for the iterative optimization algorithm. Default is 10^4 iterations.

epsilon.stop

threshold for the difference between the estimated weighted total and the total in the whole cohort. If this difference is less than the value of epsilon.stop, no more iterations will be performed. Default is 10^(-10).

Details

Calibration matches the weighted total of the auxiliary variables in the case-cohort (with calibrated weights), to the un-weighted auxiliary variables total in the whole cohort. In other words, it solves in \eta \sum_{j=1}^J \sum_{i=1}^{n^{(j)}} \lbrace \xi_{i,j} w_{i,j} \text{exp}(\eta' A_{i,j}) A_{i,j} - A_{i,j} \rbrace = 0, with \xi_{i,j} the sampling indicator and w_{i,j} the design weight of individual i in stratum j, and with \sum_{j=1}^J \sum_{i=1}^{n^{(j)}} A_{i,j} the total in the whole cohort. See Section 4.1 and Web Appendix D.1 in Etievant and Gail (2023). The Newton Raphson method is used to solve the optimization problem. In the end, the calibrated weights of the case-cohort individuals are given by w_{i,j} \text{exp}(\hat \eta' A_{i,j}), and \sum_{j=1}^J \sum_{i=1}^{n^{(j)}} \lbrace \xi_{i,j} w_{i,j} \text{exp}(\hat \eta' A_{i,j}) A_{i,j} \rbrace gives the estimated total.

Value

eta.hat: vector of length q with final eta values.

calibrated.weights: vector with the calibrated weights for the individuals in the case-cohort (phase-two data), computed from design.weights, A.phase2 and eta.hat.

estimated.total: vector with the estimated totals, computed from the calibrated.weights and A.phase2.

References

Deville, J.C. and Sarndal, C.E. (1992). Calibration Estimators in Survey Sampling. Journal of the American Statistical Association, 87, 376-382.

Etievant, L., Gail, M.H. (2023). Cox model inference for relative hazard and pure risk from stratified weight-calibrated case-cohort data. Submitted.

See Also

auxiliary.construction, influences, influences.RH, influences.CumBH and influences.PR.

Examples

  data(dataexample, package="CaseCohortCoxSurvival")

  casecohort <- dataexample$casecohort # a stratified case-cohort
  A <- dataexample$A # matrix with auxiliary variables values in the cohort
  indiv.phase2 <- casecohort$id
  q <- ncol(A)
  total <- colSums(A)
  A.phase2 <- A[indiv.phase2,]
  calib <- calibration(A.phase2 = A[indiv.phase2,], design.weights = casecohort$weights,
            total = total, eta0 = rep(0, q), niter.max = 10^3, epsilon.stop = 10^(-10))
  # print calibrated weights
  #calib$calibrated.weights

[Package CaseCohortCoxSurvival version 0.0.34 Index]