test_ditrunc_elife: Likelihood ratio test for doubly interval truncated data

View source: R/doubletruncation.R

test_ditrunc_elifeR Documentation

Likelihood ratio test for doubly interval truncated data

Description

This function fits separate models for each distinct value of covariates and computes a likelihood ratio test to test whether there are significant differences between groups.

Usage

test_ditrunc_elife(
  time,
  covariate,
  thresh = 0,
  ltrunc1 = NULL,
  rtrunc1 = NULL,
  ltrunc2 = NULL,
  rtrunc2 = NULL,
  family = c("exp", "gp", "gomp", "gompmake", "weibull", "extgp", "extweibull", "perks",
    "beard", "perksmake", "beardmake"),
  weights = rep(1, length(time)),
  arguments = NULL,
  ...
)

Arguments

time

excess time of the event of follow-up time, depending on the value of event

covariate

vector of factors, logical or integer whose distinct values are

thresh

vector of thresholds

family

string; choice of parametric family

weights

weights for observations

arguments

a named list specifying default arguments of the function that are common to all elife calls

...

additional arguments for optimization, currently ignored.

Value

a list with elements

  • stat: likelihood ratio statistic

  • df: degrees of freedom

  • pval: the p-value obtained from the asymptotic chi-square approximation.


longevity documentation built on Nov. 12, 2023, 5:07 p.m.