getEffects: Calculates round robin effects for multiple variables

View source: R/getEffects.R

getEffectsR Documentation

Calculates round robin effects for multiple variables

Description

This is a helper function which facilitates the calculation of round robin effects if many variables are assessed. Only univariate analyses are possible at the moment.

Usage

getEffects(formule, data, varlist, by=NA, na.rm=TRUE, 
			minVar=localOptions$minVar, gm=FALSE, ...)

Arguments

formule

The right hand side of the formula, specifying the actor, partner and group variable.

data

The data frame.

varlist

A vector with the column names (the column numbers are not possible!) of the variables which should be inserted at the left hand side of the formula.

by

By which variables should the results be merged? If by is NA (the default), a intelligent default handling is performed. It is strongly recommended to keep the defaults.

na.rm

This argument is passed to function RR.

minVar

Set the minVar parameter for all analyses. See RR for details on this parameter.

gm

Should effects returned as group centered (gm=FALSE, or with group means included (gm=TRUE)?)

...

Additional parameters passed to RR (e.g., selfenhance)

Value

A data frame with all effects is returned

Author(s)

Felix Schönbrodt

See Also

RR

Examples


data(likingLong)
res <- getEffects(~perceiver.id*target.id, 
				  data=likingLong, 
				  varlist=c("liking_a", "liking_b", "metaliking_a", "metaliking_b"))
str(res)

# effects including group means:
res.gm <- getEffects(~perceiver.id*target.id, 
				  data=likingLong, gm=TRUE,
				  varlist=c("liking_a", "liking_b", "metaliking_a", "metaliking_b"))
str(res.gm)


# Multipe groups
#-----------------------
data("multiLikingLong")

res.g <- getEffects(~perceiver.id*target.id|group.id, 
				  data=multiLikingLong, 
				  varlist=c("liking_a", "liking_b", "metaliking_a", "metaliking_b"))
str(res.g)

# effects including group means:
res.g.gm <- getEffects(~perceiver.id*target.id|group.id, 
				  data=multiLikingLong, gm=TRUE,
				  varlist=c("liking_a", "liking_b", "metaliking_a", "metaliking_b"))
str(res.g.gm)


TripleR documentation built on April 26, 2022, 5:08 p.m.