Learn R Programming

datarium (version 0.2.0)

selfesteem: Self-Esteem Score Data for One-way Repeated Measures ANOVA

Description

The dataset contains 10 individuals' self-esteem score on three time points during a specific diet to determine whether their self-esteem improved.

One-way repeated measures ANOVA can be performed in order to determine the effect of time on the self-esteem score.

It is the data set used in the Datanovia tutorial “Repeated Measures ANOVA in R: Compare Means Across Time” (https://www.datanovia.com/learn/biostatistics/anova/repeated-measures-anova-in-r).

Usage

data("selfesteem")

Arguments

Format

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

id

participant identifier (1 to 10).

t1

the self-esteem score at the first time point.

t2

the self-esteem score at the second time point.

t3

the self-esteem score at the third time point.

The self-esteem score is a simulated measure on an arbitrary scale with no real-world units.

See Also

selfesteem2, the two-way (treatment x time) companion data set. Datanovia tutorial: Repeated Measures ANOVA in R: Compare Means Across Time.

Examples

Run this code
data(selfesteem)
head(selfesteem)

# One-way repeated measures ANOVA of the self-esteem score over time
selfesteem_long <- reshape(selfesteem, varying = c("t1", "t2", "t3"),
                           v.names = "score", timevar = "time",
                           direction = "long")
summary(aov(score ~ factor(time) + Error(factor(id)/factor(time)),
            data = selfesteem_long))

Run the code above in your browser using DataLab