Computes one-way ANOVAS for one group variable and specified test variables. If no variables are specified, all numeric (integer or double) variables are used.

unianova(data, group_var, ..., descriptives = FALSE, post_hoc = FALSE)

Arguments

data

a tibble

group_var

group variable (column name)

...

test variables (column names). Leave empty to compute ANOVAs for all numeric variables in data.

descriptives

a logical indicating whether descriptive statistics (mean & standard deviation) for all group levels should be added to the returned tibble. Defaults to FALSE.

post_hoc

a logical indicating whether post-hoc tests (Tukey's HSD) should be computed. Results of the post-hoc test will be added in a list column of result tibbles.

Value

a tibble

Examples

WoJ %>% unianova(employment, autonomy_selection, autonomy_emphasis)
#> # A tibble: 2 x 6 #> Var F df_num df_denom p eta_squared #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 autonomy_selection 2.42 2 1194 0.0896 0.00403 #> 2 autonomy_emphasis 5.86 2 1192 0.00293 0.00974
WoJ %>% unianova(employment)
#> # A tibble: 11 x 6 #> Var F df_num df_denom p eta_squared #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 autonomy_selection 2.42 2 1194 0.0896 0.00403 #> 2 autonomy_emphasis 5.86 2 1192 0.00293 0.00974 #> 3 ethics_1 2.17 2 1197 0.115 0.00361 #> 4 ethics_2 2.20 2 1197 0.111 0.00367 #> 5 ethics_3 5.33 2 1197 0.00498 0.00882 #> 6 ethics_4 3.45 2 1197 0.0320 0.00574 #> 7 work_experience 4.48 2 1184 0.0115 0.00752 #> 8 trust_parliament 1.53 2 1197 0.218 0.00254 #> 9 trust_government 12.9 2 1197 0.00000297 0.0210 #> 10 trust_parties 0.842 2 1197 0.431 0.00141 #> 11 trust_politicians 0.328 2 1197 0.721 0.000547
WoJ %>% unianova(employment, descriptives = TRUE, post_hoc = TRUE)
#> # A tibble: 11 x 13 #> Var F df_num df_denom p eta_squared `M_Full-time` `SD_Full-time` #> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 auto~ 2.42 2 1194 8.96e-2 0.00403 3.90 0.782 #> 2 auto~ 5.86 2 1192 2.93e-3 0.00974 4.12 0.781 #> 3 ethi~ 2.17 2 1197 1.15e-1 0.00361 1.62 0.895 #> 4 ethi~ 2.20 2 1197 1.11e-1 0.00367 3.24 1.27 #> 5 ethi~ 5.33 2 1197 4.98e-3 0.00882 2.39 1.13 #> 6 ethi~ 3.45 2 1197 3.20e-2 0.00574 2.58 1.25 #> 7 work~ 4.48 2 1184 1.15e-2 0.00752 17.5 10.7 #> 8 trus~ 1.53 2 1197 2.18e-1 0.00254 3.06 0.798 #> 9 trus~ 12.9 2 1197 2.97e-6 0.0210 2.82 0.835 #> 10 trus~ 0.842 2 1197 4.31e-1 0.00141 2.42 0.720 #> 11 trus~ 0.328 2 1197 7.21e-1 0.000547 2.52 0.704 #> # ... with 5 more variables: M_Part-time <dbl>, SD_Part-time <dbl>, #> # M_Freelancer <dbl>, SD_Freelancer <dbl>, post_hoc <list>