get_strata: get strata

Description Usage Arguments Value Methods (by class) Examples

View source: R/get_strata.R

Description

Extract the equation(s) strata

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## S3 method for class 'eqs_bag'
get_last_update(x)

## Default S3 method:
get_reference(x)

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

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

get_strata(x)

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

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

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

Arguments

x

the object

Value

(chr) levels' strata for the equation x

(list) of the strata (factors) for the equations included in the eqs 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
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
library(equationer)
eq_test <- eq(age = 0.1, bmi = -0.3,
    name    = "eq_test",
    outcome = "kcal/day",
    strata = list(sex = "female")
)
get_outcome(eq_test)

eq2_test <- eq(age = 0.1, bmi = -0.3,
    name    = "eq2_test",
    outcome = "kcal/day",
    strata = list(sex = "female", nyha = 1)
)
get_strata(eq2_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_strata(eqs_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")
)

eq3_test <- eq(age = -0.1, bmi = 0.3,
    name    = "eq_test",
    outcome = "kcal/day",
    strata = list(sex = "male", nyha = 1)
)
eq4_test <- eq(age = -0.1, bmi = 0.3,
    name    = "eq2_test",
    outcome = "kcal/day",
    strata = list(sex = "unknown", nyha = 2)
)

eqs_test <- eqs(eq_test, eq2_test, name = "eqs-test")
eqs2_test <- eqs(eq3_test, eq4_test, name = "eqs2-test")

eqs_bag1_test <- eqs_bag(eqs_test, eqs2_test,
    name = "a",
    reference = "b"
)
get_strata(eqs_bag1_test)

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