estimation.weights.phase3 {CaseCohortCoxSurvival} | R Documentation |
estimation.weights.phase3
Description
Estimates the weights for the third phase of sampling (due to missingness in phase two).
Usage
estimation.weights.phase3(B.phase3, total.phase2, gamma0 = NULL, niter.max = NULL,
epsilon.stop = NULL)
Arguments
B.phase3 |
matrix for the case-cohort (phase-three data), with phase-three
sampling strata indicators. It should have as many columns as phase-three strata
( |
total.phase2 |
vector of length |
gamma0 |
vector of length |
niter.max |
maximum number of iterations for the iterative optimization
algorithm. Default is |
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 |
Details
estimation.weights.phase3
estimates the phase-three sampling weights by solving in
\gamma
\sum_{j=1}^J \sum_{i=1}^{n^{(j)}} \lbrace \xi_{i,j} V_{i,j}
\text{exp}( \gamma' B_{i,j}) B_{i,j} - \xi_{i,j} B_{i,j} \rbrace = 0,
with \xi_{i,j}
the phase-two sampling indicator and V_{i,j}
the phase-three
sampling indicator of individual i
in stratum j
, and with
\sum_{j=1}^J \sum_{i=1}^{n^{(j)}} \xi_{i,j} B_{i,j}
the total in the
phase-two data. See Etievant and Gail (2024).
The Newton Raphson method is used to solve the optimization problem.
In the end, the estimated weights are given by \text{exp}(\hat \gamma' B_{i,j})
,
and \sum_{j=1}^J \sum_{i=1}^{n^{(j)}} \xi_{i,j} V_{i,j} \text{exp}(\hat \gamma' B_{i,j}) B_{i,j}
gives the estimated total.
Value
gamma.hat
: vector of length J^{(3)}
with final gamma values.
estimated.weights
: vector with the estimated phase-three weights for the
individuals in the case-cohort (phase-three data), computed from B.phase3
and gamma.hat
.
estimated.total
: vector with the estimated totals, computed from the
estimated.weights
and B.phase3
.
References
Etievant, L., Gail, M. H. (2024). Cox model inference for relative hazard and pure risk from stratified weight-calibrated case-cohort data. Lifetime Data Analysis, 30, 572-599.
See Also
influences.missingdata
, influences.RH.missingdata
,influences.CumBH.missingdata
and influences.PR.missingdata
.
Examples
data(dataexample.missingdata.stratified, package="CaseCohortCoxSurvival")
cohort <- dataexample.missingdata.stratified$cohort
phase2 <- cohort[which(cohort$phase2 == 1),] # the phase-two sample
casecohort <- cohort[which(cohort$phase3 == 1),] # the stratified case-cohort
B.phase2 <- cbind(1 * (phase2$W3 == 0), 1 * (phase2$W3 == 1))
rownames(B.phase2) <- cohort[cohort$phase2 == 1, "id"]
B.phase3 <- cbind(1 * (casecohort$W3 == 0), 1 * (casecohort$W3 == 1))
rownames(B.phase3) <- cohort[cohort$phase3 == 1, "id"]
total.B.phase2 <- colSums(B.phase2)
J3 <- ncol(B.phase3)
estimation.weights.p3 <- estimation.weights.phase3(B.phase3 = B.phase3,
total.phase2 = total.B.phase2,
gamma0 = rep(0, J3),
niter.max = 10^(4),
epsilon.stop = 10^(-10))