wrap.planned: ANOVA (planned contrasts)

View source: R/wrap.planned.R

wrap.plannedR Documentation

ANOVA (planned contrasts)

Description

Performs planned contrasts for a one-way, between-subjects ANOVA. This function assumes categorical (i.e., unordered) independent variables, fixed effects, and equality of variances across conditions. If variance differs significantly by condition in your data, the function also displays the results of Levene's test for equality of variances with centering at the median. Note that the confidence interval and Cohen's d use mean-square error to estimate variance.

Usage

wrap.planned(dv1, iv1, levels, weights)

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

## Contrast between two levels of the independent variable
wrap.planned(dv1 = bdata$DV5, iv1 = bdata$IV2, levels = c("PhotoA", "PhotoB"),
weights = c(-1, 1))

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


michaelkardas/bwrappers documentation built on Nov. 13, 2022, 1:14 a.m.