ncc_selection_prob: Generate a nested case-control study

Description Usage Arguments Value Author(s) References

Description

ncc_selection_prob calculates the probability of selection into a nested case control study. Given a nested case control study with time of entry, time of exit, exit status, and the number of potentially eligible controls for each case from the full cohort, the probability of being selected as a control for one or more cases is calculated.

Usage

1
2
ncc_selection_prob(entry = 0, exit, fail, origin = 0, controls = 1,
  match = list(), caseset, elig_controls, data = NULL, silent = FALSE)

Arguments

entry

time of entry to follow-up

exit

time of exit from follow-up

fail

indicator of status on exit from follow-up (censored=0, fail=1)

origin

the origin of the analysis time-scale. For instance, date of birth, if age is the desired time-scale.

controls

the number of controls that were sampled for each failure

match

a list of categorical variables that were matched on

caseset

a caseset identifier (common within matched case-control sets)

elig_controls

an integer indicating the number of individuals from the full cohort who were eligible be selected as a control for each case. This should be constant within caseset.

data

a data.frame which contains the follow-up, matching, caseset identifier, and number of eligible controls variables.

silent

if FALSE, provides entertainment by echoing a fullstop to the screen as each risk set is generated. If TRUE, output to the console is suppressed.

Value

A data.frame comprising the original data, with a variable indicating the probability of being selected in the nested case control sample (ncc_pr)

Author(s)

David C Muller

References

Samuelsen S. O. (1997). A psudolikelihood approach to analysis of nested case-control studies. Biometrika, 84(2), 379-394. doi:10.1093/biomet/84.2.379


dcmuller/ncctools documentation built on May 20, 2019, 2:20 p.m.