get_covariates: get covariates

Description Usage Arguments Value Methods (by class) Examples

View source: R/get_covariates.R

Description

Extract the equation(s) covariates

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
get_covariates(x)

## S3 method for class 'eq'
get_covariates(x)

## S3 method for class 'eqs'
get_covariates(x)

## S3 method for class 'eqs_bag'
get_covariates(x)

Arguments

x

the object

Value

(chr) covariates of the equation x

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
library(equationer)
eq_test <- eq(age = 0.1, bmi = -0.3,
    name    = "first eq_test",
    outcome = "kcal/day",
    strata = list(sex = "female")
)
get_covariates(eq_test)
library(equationer)
eq_test <- eq(age = 0.1, bmi = -0.3,
    name    = "eq_test",
    outcome = "kcal/day",
    strata = list(sex = "female")
)
eq2_test <- eq(age = 0.1, bmi = -0.3,
    name    = "eq2_test",
    outcome = "kcal/day",
    strata = list(sex = "male")
)

eqs_test <- eqs(eq_test, eq2_test, name = "eqs-test")
get_covariates(eqs_test)

UBESP-DCTV/equationer documentation built on Jan. 17, 2021, 6:30 p.m.