Learn R Programming

TimeDepFrail (version 0.1.0)

check.formula_terms: Check Correctness of Formula Terms

Description

The function controls that the terms composing the formula object provided in input to the main model are correct. They must include:

  • response variable on the left hand side

  • covariates (numerical or categorical) on the right hand side

  • cluster variable (categorical) on the right hand side and specified by the function 'cluster()'

Moreover, it controls that the covariates are contained in the dataset provided.

Usage

check.formula_terms(formula, data)

Value

An error if any condition is not satified.

Arguments

formula

Formula object specifying the relationship between the time-to-event, the covariates and the cluster variables.

data

Dataset in which these variables can be found.