| 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 w_{i,k,j} \sigma_{i,k,j}, with
w_{i,k,j} = \frac{n^{(j)}(n^{(j)} -1)}{m^{(j)}(m^{(j)} -1)} if individuals
i and k in stratum j are both non-cases, and
w_{i,k,j} = \left( \frac{n^{(j)}}{m^{(j)}} \right)^2 otherwise,
i \neq k \in \lbrace 1, \dots, n^{(j)} \rbrace,
j \in \lbrace 1, \dots, J \rbrace.
w_{i,i,j} = \frac{n^{(j)}}{m^{(j)}} if individuals i in stratum j
is a non-case, i \in \lbrace 1, \dots, n^{(j)} \rbrace,
j \in \lbrace 1, \dots, J \rbrace.
\sigma_{i,k,j} = \frac{m^{(j)}(m^{(j)} -1)}{n^{(j)}(n^{(j)} -1)} -
\left( \frac{m^{(j)}}{n^{(j)}} \right)^2 if individuals i and
k in stratum j are both non-cases,
i \neq k \in \lbrace 1, \dots, n^{(j)} \rbrace,
j \in \lbrace 1, \dots, J \rbrace.
\sigma_{i,i,j} = \frac{m^{(j)}}{n^{(j)}} - \left(1 - \frac{m^{(j)}}{n^{(j)}} \right)
if individuals i in stratum j is a non-case,
i \in \lbrace 1, \dots, n^{(j)} \rbrace,
j \in \lbrace 1, \dots, J \rbrace.
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