calibration {CaseCohortCoxSurvival}R Documentation



Calibrates the design weights using the raking procedure.


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



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 to be calibrated.


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


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).


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


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).


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.


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. vector with the estimated totals, computed from the calibrated.weights and A.phase2.


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, influences, influences.RH, influences.CumBH and influences.PR.


  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

[Package CaseCohortCoxSurvival version 0.0.32 Index]