Calculates round robin effects for multiple variables

Share:

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

1
2
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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)