Skip to contents

Tidy summarizes information about the components of the standardized regression fit.

Usage

# S3 method for class 'std_glm'
tidy(x, ...)

Arguments

x

An object of class std_glm

...

Not currently used

Value

A data.frame

Examples

set.seed(6)
n <- 100
Z <- rnorm(n)
X <- rnorm(n, mean = Z)
Y <- rbinom(n, 1, prob = (1 + exp(X + Z))^(-1))
dd <- data.frame(Z, X, Y)
x <- standardize_glm(
  formula = Y ~ X * Z,
  family = "binomial",
  data = dd,
  values = list(X = 0:1),
  contrasts = c("difference", "ratio"),
  reference = 0
)
tidy(x)
#>   X   Estimate  Std.Error lower.0.95   upper.0.95   contrast transform
#> 1 0  0.5190639 0.06149960  0.3985269  0.639600881       none  identity
#> 2 1  0.3905311 0.08816362  0.2177336  0.563328623       none  identity
#> 3 0  0.0000000 0.00000000  0.0000000  0.000000000 difference  identity
#> 4 1 -0.1285328 0.06377604 -0.2535315 -0.003534039 difference  identity
#> 5 0  1.0000000 0.00000000  1.0000000  1.000000000      ratio  identity
#> 6 1  0.7523758 0.12604216  0.5053377  0.999413910      ratio  identity