samWGT: Calculate the proposed weight which weights the event...

samWGTR Documentation

Calculate the proposed weight which weights the event controls with the inverse selection probability

Description

This proposed weight modifies the method in Samuelsen (1997) by weighting the event controls with the inverse selection probability.

Usage

samWGT(xi, di, id, case, control, m0, M.dat = NULL, a.M = NULL)

Arguments

xi

a vector of censored event times.

di

a vector of binary values (1 or 0) indicating whether the true event time is observed.

id

a vector which identifies the subjects.

case

a vector which indicates whether each subject is a sub-cohort case. The value is 1 if the subject is a sub-cohort case, and it is 0 if the subject is not a sub-cohort case.

control

a vector which indicates whether each subject is a sub-cohort control. The value is 1 if the subject is a sub-cohort control, and it is 0 if the subject is not a sub-cohort control.

m0

a numerical value which is the number of controls selected for each case.

M.dat

a data.frame which includes the matching variables. The default value is NULL if the selection is without matching.

a.M

a numerical vector which includes the matching constraint for each matching variable. The default value is NULL if the selection is without matching.

Value

a vector of NCC weights.

References

Samuelsen, S. (1997). A psudolikelihood approach to analysis of nested case-control studies. Biometrika, 84(2):379–394.


michellezhou2009/NCCIPW documentation built on April 25, 2022, 3:39 p.m.