eta.sq | R Documentation |
This function computes eta squared for one or more outcome variables in combination with one or more grouping variables.
eta.sq(x, group, digits = 2, as.na = NULL, check = TRUE, output = TRUE)
x |
a numeric vector, matrix or data frame with numeric vectors for the outcome variables. |
group |
a vector, matrix or data frame with integer vectors, character vectors or factors for the grouping variables. |
digits |
an integer value indicating the number of decimal places to be used for displaying eta squared. |
as.na |
a numeric vector indicating user-defined missing values,
i.e. these values are converted to |
check |
logical: if |
output |
logical: if |
Returns an object of class misty.object
, which is a list with following
entries:
call |
function call |
type |
type of analysis |
data |
list with the input specified in |
args |
specification of function arguments |
result |
numeric vector with results |
Takuya Yanagida takuya.yanagida@univie.ac.at
Rasch, D., Kubinger, K. D., & Yanagida, T. (2011). Statistics in psychology - Using R and SPSS. New York: John Wiley & Sons.
cohens.d
, cor.cont
, cor.matrix
,
cor.cramer
, cor.phi
dat <- data.frame(x1 = c(1, 1, 1, 1, 2, 2, 2, 2, 2),
x2 = c(1, 1, 1, 2, 2, 2, 3, 3, 3),
y1 = c(3, 2, 4, 5, 6, 4, 7, 5, 7),
y2 = c(2, 4, 1, 5, 3, 3, 4, 6, 7))
# Eta squared for y1 explained by x1
eta.sq(dat$y1, group = dat$x1)
# Eta squared for y1 and y2 explained by x1 and x2
eta.sq(dat[, c("y1", "y2")], group = dat[, c("x1", "x2")])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.