estimation.weights.phase3 {CaseCohortCoxSurvival} | R Documentation |
estimation.weights.phase3
Description
Estimates the weights for the third phase of sampling (due to missingness).
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
with the phase-two sampling indicator and
the phase-three
sampling indicator of individual
in stratum
, and with
the total in the
phase-two data. See Section 5.2 in Etievant and Gail (2023).
The Newton Raphson method is used to solve the optimization problem.
In the end, the estimated weights are given by ,
and
gives the estimated total.
Value
gamma.hat
: vector of length 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. (2023). Cox model inference for relative hazard and pure risk from stratified weight-calibrated case-cohort data. Submitted.
See Also
influences.missingdata
, influences.RH.missingdata
,
influences.CumBH.missingdata
and influences.PR.missingdata
.
Examples
data(dataexample.missingdata, package="CaseCohortCoxSurvival")
casecohort <- dataexample.missingdata$casecohort # a simulated stratified case-cohort
# phase-two data: dataexample.missingdata$casecohort.phase2
B.phase2 <- dataexample.missingdata$B.phase2
B.phase3 <- dataexample.missingdata$B.phase3
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))
# print estimated phase-three weights
#estimation.weights.p3$estimated.weights