Learn R Programming

datarium: Data bank for statistical analyses and visualization

Contains data organized by topic: categorical data, regression model, means comparisons, independent and repeated measures ANOVA, mixed ANOVA and ANCOVA.

  • Categorical Data
    • housetasks.raw
    • titanic.raw
  • Regression Model
    • marketing
  • Comparing Two Means
    • mice
    • mice2
    • genderweight
  • Independent-Measures ANOVA
    • heartattack
    • headache
    • performance
    • jobsatisfaction
  • Repeated Measures ANOVA
    • selfesteem
    • selfesteem2
    • weightloss
    • depression
  • Mixed ANOVA
    • anxiety
  • ANCOVA
    • stress
  • Comparing Proportions
    • properties

Helper functions

The two data sets (Titanic and housetasks) are frequency/contingency table. We'll create our demo data sets by recovering the original data from Titanic and housetasks tables.

To do so, first copy and paste the following helper function:

counts_to_cases <- function(x, countcol = "Freq") {
    if(!inherits(x, "table")) x <- as.table(as.matrix(x))
      x <- as.data.frame(x)
    # Get the row indices to pull from x
    idx <- rep.int(seq_len(nrow(x)), x[[countcol]])
    # Drop count column
    x[[countcol]] <- NULL
    # Get the rows from x
    x <- x[idx, ]
    rownames(x) <- 1:nrow(x)
    x
}

Then, recover the original data as follow:

# Load the data
data("Titanic")
data("housetasks", package = "factoextra")

# Recover the original raw data
titanic.raw <- counts_to_cases(Titanic)
housetasks.raw <- counts_to_cases(housetasks)

Copy Link

Version

Install

install.packages('datarium')

Monthly Downloads

5,799

Version

0.1.0

License

GPL-2

Maintainer

Alboukadel Kassambara

Last Published

May 21st, 2019

Functions in datarium (0.1.0)

genderweight

Weight Data By Gender for Two-Samples Mean Test
stress

Stress Data for Two-Way ANCOVA
mice

Mice Weight Data for One Sample Mean Test
mice2

Mice Weight Data for Paired-Samples Mean Test
selfesteem

Self-Esteem Score Data for One-way Repeated Measures ANOVA
selfesteem2

Self Esteem Score Data for Two-way Repeated Measures ANOVA
performance

Performance Data for Three-Way Mixed ANOVA
titanic.raw

Survival of Passengers on the Titanic
properties

Properties Data for Chi-square Test of Independence
anxiety

Anxiety Data for Two-Way Mixed ANOVA
heartattack

Heart Attack Data for Three Way ANOVA
headache

Headache Data for Three Way ANOVA
depression

Depression Data for Two Way Mixed ANOVA
weightloss

Weight Loss Score Data for Three-way Repeated Measures ANOVA
housetasks.raw

Housetasks
jobsatisfaction

Job Satisfaction Data for Two-Way ANOVA
marketing

Marketing Data Set