llh_mecc_cond: <Private function> Negative log-likelihood in weighted...

View source: R/extreme_case_control.R

llh_mecc_condR Documentation

<Private function> Negative log-likelihood in weighted analysis of (M)ECC sample

Description

<Private function> Negative log-likelihood in weighted analysis of (M)ECC sample

Usage

llh_mecc_cond(beta, x_mat, y_name, set_id_name, surv, surv_tau, mecc)

Arguments

beta

A vector of regression coefficients corresponding to x_formula.

x_mat

A model.matrix (without the first column that has value 1 for all subjects).

y_name

A string indicating cases and controls in mecc. Note that this is not the original indicator for event/censoring.

set_id_name

A string indicating the ID of matched sets in the (M)ECC data. See Details.

surv

Estimated baseline survival probability for each subject in mecc, based on the underlying cohort. The length of this variable must be the same as the number of rows in mecc. See Details.

surv_tau

Estimated baseline survival probability evaluate at time tau, based on the underlying cohort. The length of this variable must be the same as the number of rows in mecc. See Details.

mecc

(M)ECC data. A data.frame. Make sure the covariates in x_formula are all centred at cohort average.

Details

This function implements the conditional approach described in Section 2.2.1 of Salim et al 2014. This requires controls to be "individually matched" to each control. If users used the function draw_mecc to draw the MECC sample, the sample would include a variable that indicates the matched sets, and two variables corresponding to surv and surv_tau. Otherwise users should randomly match each case to controls (within strata if the MECC sample is matched on confounder(s)) and compute them from the full cohort as described in Section 2.2 of Salim et al 2014.

Value

Returns the negative log-likelihood in the weighted analysis of a (more) extreme case-control sample.

Author(s)

Yilin Ning, Nathalie C Støer

References

  • Salim A, Ma X, Fall K, et al. Analysis of incidence and prognosis from 'extreme' case–control designs. Stat Med 2014; 33: 5388–5398.

  • Støer NC, Salim A, Bokenberger K, et al. Is the matched extreme case–control design more powerful than the nested case–control design?. Stat Methods Med Res 2019; 28(6): 1911-1923.

See Also

draw_mecc, analyse_mecc_cond


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