product.covar.weight {CaseCohortCoxSurvival} | R Documentation |
product.covar.weight
Description
Computes the product of joint design weights and joint sampling indicators covariances, needed for the phase-two component of the variance (with design or calibrated weights).
Usage
product.covar.weight(casecohort, stratified = NULL)
Arguments
casecohort |
if |
stratified |
was the sampling of the case-cohort stratified on |
Details
product.covar.weight
creates the matrix with the products of joint design
weights and joint sampling indicator covariances, for the non-cases in the case
cohort. In other words, it has as many rows and columns as non-cases in the case
cohort, and contains the , with
if individuals
and
in stratum
are both non-cases, and
otherwise,
,
.
if individuals
in stratum
is a non-case,
,
.
if individuals
and
in stratum
are both non-cases,
,
.
if individuals
in stratum
is a non-case,
,
.
See Section 3.3 in Etievant and Gail (2023).
Value
product.covar.weight
: matrix with the products of joint design weights and
joint sampling indicator covariances, for the non-cases in the case-cohort.
References
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
variance
, that uses product.covar.weight
to compute the variance
estimate that follows the complete variance decomposition (superpopulation and
phase-two variance components).
Examples
data(dataexample, package="CaseCohortCoxSurvival")
casecohort <- dataexample$casecohort # a simulated stratified case-cohort
prod.covar.weight <- product.covar.weight(casecohort, stratified = TRUE)
nrow(prod.covar.weight)
ncol(prod.covar.weight)
sum(casecohort$status == 0) # number of non-cases in the case-cohort