ncc_eligible_controls: Calculate the number of eligible controls for each case for a...

Description Usage Arguments Details Value Author(s)

Description

ncc_eligible_controls calculates the number of eligible controls for each case for a nested case control study. Given time of entry, time of exit, and exit status, risk sets are computed at each failure time. If matching variables are specified, ncc_eligible_controls creates matched or stratified risk sets, which are computed separately within matching strata.

Usage

1
2
ncc_eligible_controls(entry = 0, exit, fail, origin = 0, match = list(),
  include = list(), 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.

match

a list of categorical variables for matching cases and controls

include

a list of variables to include in the returned data.frame

data

a data.frame which contains the follow-up and matching 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.

Details

Given follow-up information from a cohort study, ncc_eligible controls generates risk sets at each observed failure time, and counts the number of eligible controls within each risk set. This information can be used to calculate the probability of inclusion in the NCC study (see ncc_selection_prob)

Value

A data.frame comprising:

ncc_id

a unique individual identifier

ncc_elig_co

a count of the number of controls eligible for selection in the set

followed by the variables specified in the match and include lists.

Author(s)

David C Muller


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