wrap.anova.planned: ANOVA (planned contrasts)

Description Usage Arguments Examples

View source: R/wrap.anova.planned.R

Description

Performs planned contrasts for a one-way, between-subjects ANOVA. This function assumes categorical (i.e., unordered) independent variables, fixed effects, and equal variance across conditions.

Usage

1

Arguments

dv1

Column vector containing the dependent variable

iv1

Column vector containing the between-subjects independent variable

levels

String vector containing two or more factor levels of the independent variable

weights

Numeric vector containing the contrast weights. Must sum to +1 and -1.

Examples

1
2
3
4
5
6
7
## Contrast between two levels of the independent variable
wrap.anova.planned(dv1 = bdata$DV1, iv1 = bdata$IV2, levels = c("PhotoA", "PhotoB"),
weights = c(-1, 1))

## Contrast between three levels of the independent variable
wrap.anova.planned(dv1 = bdata$DV1, iv1 = bdata$IV2, levels = c("PhotoA", "PhotoB",
"PhotoC"), weights = c(-1, 0.5, 0.5))

michaelkardas/behavioralwrappers documentation built on Jan. 2, 2020, 7:46 a.m.