Contains the job satisfaction score organized by gender and education level.

It is the data set used in the Datanovia tutorial “Two-Way ANOVA in R: Two Factors and Their Interaction” (https://www.datanovia.com/learn/biostatistics/anova/two-way-anova-in-r).

data("jobsatisfaction")

Format

A data frame with 58 rows and 4 columns (stored as a tibble).

id

participant identifier (1 to 58).

gender

the participant's gender, "male" or "female".

education_level

the participant's education level, "school", "college" or "university".

score

a simulated job satisfaction score (an arbitrary scale with no real-world units).

Source

A simulated dataset for teaching two-way ANOVA.

Examples

data(jobsatisfaction)
head(jobsatisfaction)
#> # A tibble: 6 × 4
#>   id    gender education_level score
#>   <fct> <fct>  <fct>           <dbl>
#> 1 1     male   school           5.51
#> 2 2     male   school           5.65
#> 3 3     male   school           5.07
#> 4 4     male   school           5.51
#> 5 5     male   school           5.94
#> 6 6     male   school           5.8 

# Two-way ANOVA of satisfaction by gender and education level
summary(aov(score ~ gender * education_level, data = jobsatisfaction))
#>                        Df Sum Sq Mean Sq F value  Pr(>F)    
#> gender                  1   0.54    0.54   1.787 0.18709    
#> education_level         2 113.68   56.84 187.892 < 2e-16 ***
#> gender:education_level  2   4.44    2.22   7.338 0.00156 ** 
#> Residuals              52  15.73    0.30                    
#> ---
#> Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1