plot.RRuni {TripleR}R Documentation

Plot variance components from SRAs

Description

This function plots variance components for all RR objects.

Usage

## S3 method for class 'RRuni'
plot(x, ..., measure=NA, geom="bar")
## S3 method for class 'RRmulti'
plot(x, ..., measure=NA, geom="scatter", conf.level=0.95, connect=FALSE)

Arguments

x

A RR results object

...

Further arguments passed to the plot function

measure

Sets the labels to ‘behavior’ or ‘perception’; if no parameter is provided the function uses the defaults from RR.style

geom

Style of plot: set ‘bar’ or ‘pie’ for single groups; ‘scatter’ or ‘bar’ for multiple groups

conf.level

Confidence level for error bars in the scatter style

connect

Should dots for variance components of each group be connected? (Looks usually very cluttered ...)

Value

A ggplot2 object is returned - that means, you can subsequently adjust the scale labels, etc.

Examples

	data(likingLong)
	RR1 <- RR(liking_a ~ perceiver.id*target.id, data=likingLong)
	plot(RR1)
	plot(RR1, geom="pie")
	
	RR2 <- RR(liking_a + metaliking_a ~ perceiver.id*target.id, data=likingLong)
	plot(RR2)
	
	
	data("multiLikingLong")
	RR1m <- RR(liking_a ~ perceiver.id*target.id|group.id, data=multiLikingLong)
	plot(RR1m)
	plot(RR1m, measure="perception")
	plot(RR1m, measure="perception", geom="bar")
	plot(RR1m, measure="perception", connect=TRUE)

	RR2m <- RR(liking_a + metaliking_a ~ perceiver.id*target.id|group.id, data=multiLikingLong)
	plot(RR2m)

[Package TripleR version 1.2 Index]