ANOVA: Perform Comprehensive Analysis of Variance (ANOVA)

ANOVAR Documentation

Perform Comprehensive Analysis of Variance (ANOVA)

Description

This function performs a comprehensive Analysis of Variance (ANOVA) that handles both univariate and multivariate designs. It provides detailed statistics including effect sizes and sphericity tests for repeated measures designs.

Usage

ANOVA(data, dv, formula, type = 2)

Arguments

data

A data frame containing the variables for analysis

dv

Character string specifying the dependent variable

formula

A formula object specifying the ANOVA design. For repeated measures, the within-subjects factors should be on the right side of the ~

type

Numeric value specifying the type of sum of squares to use (default = 2)

Details

The function calculates: * Partial eta-squared (etaSqP) * Eta-squared (etaSq) * Omega-squared (omegaSq) * F-values and p-values * Sphericity tests for repeated measures designs

Value

A list object of class "ANOVA" containing:

fit

The fitted linear model object

idata

Data frame containing the within-subjects factor levels

wdata

The data in wide format

full.analysis

Complete Anova results

results

List containing univariate and multivariate results

sphericity.test

Mauchly's test of sphericity (for repeated measures)

sphericity.correction

Sphericity corrections (Greenhouse-Geisser and Huynh-Feldt)

Examples

# Between-subjects ANOVA
ANOVA(data = mydata, dv = "score", formula = ~ group)

# Repeated measures ANOVA
ANOVA(data = mydata, dv = "score", formula = subject ~ time)

# Mixed ANOVA
ANOVA(data = mydata, dv = "score", formula = subject + group ~ time)


ccamp83/mu documentation built on Nov. 7, 2024, 5:17 p.m.