Skip to contents

The regression output comes from stats::lm.

[Experimental]

Usage

model_metrics_tab(
  data,
  col,
  categorical,
  metric,
  labels = TRUE,
  clean = TRUE,
  ...
)

Arguments

data

A tibble.

col

The target column holding metric values.

categorical

A tidy column selection holding categorical variables.

metric

A tidy column selection holding metric variables.

labels

If TRUE (default) extracts labels from the attributes, see codebook.

clean

Prepare data by data_clean.

...

Placeholder to allow calling the method with unused parameters from effect_metrics.

Value

A volker list object containing volker tables with the requested statistics.

Examples

library(volker)
data <- volker::chatgpt

data |>
  filter(sd_gender != "diverse") |>
  model_metrics_tab(use_work, categorical = c(sd_gender, adopter), metric = sd_age)
#> 
#> 
#> |Term                                              | estimate| ci low| ci high| standard error|     t|    p| stars|
#> |:-------------------------------------------------|--------:|------:|-------:|--------------:|-----:|----:|-----:|
#> |(Intercept)                                       |     4.67|   3.64|    5.70|           0.52|  9.00| 0.00|   ***|
#> |female (Reference)                                |         |       |        |               |      |     |      |
#> |male                                              |    -0.48|  -1.02|    0.06|           0.27| -1.75| 0.08|     .|
#> |I try new offers immediately (Reference)          |         |       |        |               |      |     |      |
#> |I try new offers rather quickly                   |    -1.52|  -2.29|   -0.76|           0.38| -3.96| 0.00|   ***|
#> |I wait until offers establish themselves          |    -1.96|  -2.86|   -1.06|           0.45| -4.34| 0.00|   ***|
#> |I only use new offers when I have no other choice |    -1.36|  -3.99|    1.27|           1.33| -1.03| 0.31|      |
#> |sd_age                                            |    -0.01|  -0.03|    0.00|           0.01| -1.58| 0.12|      |
#> 
#> 
#> |Item      | Partial Eta Squared| Sum of Squares| Df|    F|    p| stars| GVIF| GVIF^(1/(2*Df))|
#> |:---------|-------------------:|--------------:|--:|----:|----:|-----:|----:|---------------:|
#> |sd_gender |                0.03|           4.96|  1| 3.08| 0.08|     .| 1.10|            1.05|
#> |adopter   |                0.18|          32.78|  3| 6.78| 0.00|   ***| 1.12|            1.02|
#> |sd_age    |                0.03|           4.01|  1| 2.49| 0.12|      | 1.05|            1.02|
#> |Residuals |                    |         151.43| 94|     |     |      |     |                |
#> 
#> 
#> |Statistic                     |  value|
#> |:-----------------------------|------:|
#> |Adjusted R squared            |   0.17|
#> |Degrees of freedom            |      5|
#> |Residuals' degrees of freedom |     94|
#> |AIC                           | 339.28|
#> |F                             |   5.01|
#> |p                             |      0|
#> |stars                         |    ***|