Skip to contents

Extract the model object and observation indices from a causal_mod

Usage

get_model_fit(x)

get_model_idx(x)

Arguments

x

The causal_mod object

Value

  • For get_model_fit(): A fitted model object

  • For get_model_idx(): An integer vector of indices

Examples

m <- lm(yield ~ block + N*P*K, data=npk)
x <- causal_mod(m)
identical(get_model_fit(x), m) # TRUE
#> [1] TRUE
get_model_idx(x)
#>  [1]  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24