plot.random.effects: Plot random effects of model

Description Usage Arguments Details Examples

View source: R/plot.random.effects.R

Description

Plot the estimates of random effects with confidence intervals

Usage

1
2
3
	## S3 method for class 'random.effects'
plot(x, by = NULL, interval="confidence", level = 0.95, xlab = NULL, ylab = NULL, 
				      xlim = NULL, ylim = NULL, pch=19, col.points='red', col.seg=gray(0.5), ...)

Arguments

x

"random.effects" object

by

defines the element to be plotted

interval

Define the interval to be used. See details

level

the confidence level required

xlab

a title for the x axis

ylab

a title for the y axis

ylim

the x limits of the plot

xlim

the y limits of the plot

pch

either an integer specifying a symbol or a single character to be used as the default in plotting points

col.points

a specification for the default plotting color points

col.seg

a specification for the default plotting color segments

...

Arguments to be passed to method, such as plot

Details

interval

If interval='hpd' is plotted the posterior mean of the random effects with credibility interval. The credibility interval for this case is obtained from the sample using the function HPDinterval of the package coda. If interval='confidence', the credibility interval is obtained from normal distribution quantile (qnorm((1-level)/2,mean,sd). By default is interval='confidence'

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Not run
data(sensory)

Consumer <- factor(sensory$consumer)
Sacarose <- factor(sensory$sacarose)

#### Model 
# Not run
dex1 <- Bayesthresh(cor ~ (1|Consumer) + Sacarose, Write=TRUE, 
																			burn = 10, jump = 2, ef.iter = 10, data=sensory) 

rand <- random.effects(dex1, HPDinterval=TRUE)
plot(rand, interval='hpd')
plot(rand)

Bayesthresh documentation built on May 30, 2017, 6:24 a.m.