Learn R Programming

Bayesthresh (version 2.0.1)

plot.random.effects: Plot random effects of model

Description

Plot the estimates of random effects with confidence intervals

Usage

"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

Run this code

# 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)

Run the code above in your browser using DataLab