Skip to contents

Extract the formula used to fit a fuzzydid object.

Usage

# S3 method for class 'fuzzydid'
formula(x, ...)

Arguments

x

A fuzzydid object.

...

Unused.

Value

The original formula.

Examples

df <- expand.grid(i = seq_len(20), g = 0:1, t = 0:1)
df$d <- as.integer(df$i <= c(4, 8, 6, 16)[1 + df$t + 2 * df$g])
df$y <- 1 + 0.5 * df$g + 0.4 * df$t + 2 * df$d + sin(df$i / 7)

fit <- fuzzydid(df, y ~ d, group = "g", time = "t", did = TRUE, nose = TRUE)
formula(fit)
#> y ~ d
#> <environment: 0x55ae246f31b8>