docs/scripts/FactorialVignette.R

# easiOrigin
## Factorial Vignette

source("http://raw.githubusercontent.com/cwendorf/easiOrigin/main/source-easiOrigin.R")

### Data Management

#### Data Entry

FactorA <- c(1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2)
FactorB <- c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2)
Outcome <- c(0, 0, 3, 5, 4, 7, 4, 9, 9, 6, 4, 9, 3, 6, 8, 3)
FactorA <- factor(FactorA, levels = c(1, 2), labels = c("A1", "A2"))
FactorB <- factor(FactorB, levels = c(1, 2), labels = c("B1", "B2"))
FactorialData <- data.frame(FactorA, FactorB, Outcome)
FactorialData

#### Descriptive Statistics

descMeansBy(Outcome ~ FactorA, by = FactorB)

### Analyses of the Means

#### Confidence Intervals

ciMeansBy(Outcome ~ FactorA, by = FactorB)
ciMeansBy(Outcome ~ FactorA, by = FactorB, conf.level = .99)

#### Significance Tests

nhstMeansBy(Outcome ~ FactorA, by = FactorB)
nhstMeansBy(Outcome ~ FactorA, by = FactorB, mu = 5)

### Analyses of the Effects

#### Source Table

descMultifactor(Outcome ~ FactorA, by = FactorB)

#### Significance Test

nhstMultifactor(Outcome ~ FactorA, by = FactorB)

#### Effect Size

pvaMultifactor(Outcome ~ FactorA, by = FactorB)
cwendorf/easiOrigin documentation built on Nov. 1, 2023, 10:57 a.m.