p_not_sampled: <Private function> Compute the probability that an eligible...

View source: R/km_type_weights.R

p_not_sampledR Documentation

<Private function> Compute the probability that an eligible non-case is not sampled at each event time

Description

<Private function> Compute the probability that an eligible non-case is not sampled at each event time

Usage

p_not_sampled(n_event, n_at_risk, n_per_case)

Arguments

n_event

A vector of number of event at each event time (1 if no tie in event time, or >1 in the presence of ties). Non-integers are rounded down.

n_at_risk

A vector of the number of subject at risk at each event time. Non-integers are rounded down.

n_per_case

Number of controls to select per case. A positive integer. Non-integers are rounded down.

Value

Returns a vector of probabilities.


nyilin/SamplingDesignTools documentation built on Nov. 20, 2022, 8:07 a.m.