pulls: Extract the simulated effects out of a cooked simulation...

pullsR Documentation

Extract the simulated effects out of a cooked simulation recipe

Description

Extract the simulated effects out of a cooked simulation recipe

Usage

pull_x(object)

pull_y(object)

pull_e(object)

pull_xy(object)

pull_xye(object)

Arguments

object

an object of class xy_sim

Details

The pull functions enable a convenient extraction of certain simulated effects according to the desire of the user. With ⁠pull_*⁠ you can simply specify which effects you want to extract out of the simulation

Value

Returns the desired effects in a tibble.

Examples

# create a simulation
linear_sim <- Xy() %>%
  add_linear(p = 5) %>%
  simulate(n = 100)
# fetch the target
y <- linear_sim %>% pull_y()
# fetch all features
X <- linear_sim %>% pull_x()
# fetch the features and the target
xy <- linear_sim %>% pull_xy()
# fetch the residuals of the simulation
e <- linear_sim %>% pull_e()

andrebleier/Xy documentation built on March 29, 2023, 12:41 p.m.