Learn R Programming

WRS2 (version 0.2-0)

tsplit: A robust two-way mixed ANOVA (split-plot) for trimmed means.

Description

This function computes a two-way between-within subjects ANOVA on the trimmed means. It allows for one between subjects-variable and for one within-subjects variable.

Usage

tsplit(formula, random, data, tr = 0.2)

Arguments

formula
an object of class formula.
random
within subject specification (random effects style)
data
an optional data frame for the input data.
tr
trim level for the mean.

Value

  • Returns an object of class t2way containing:
  • Qafirst main effect
  • A.p.valuep-value first main effect
  • Qbsecond main effect
  • B.p.valuep-value second main effect
  • Qabinteraction effect
  • AB.p.valuep-value interaction effect
  • callfunction call
  • varnamesvariable names

References

Wilcox, R. (2012). Introduction to Robust Estimation and Hypothesis Testing (3rd ed.). Elsevier.

See Also

t2way

Examples

Run this code
## data need to be on long format
pictureLong <- reshape(picture, direction = "long", varying = list(3:4), idvar = "case", 
timevar = c("pictype"), times = c("couple", "alone"))
colnames(pictureLong)[4] <- "friend_requests"

tsplit(friend_requests ~ relationship_status*pictype, random = ~1|case/pictype, data = pictureLong)

Run the code above in your browser using DataLab