plotbayestwin {BayesTwin}R Documentation

Summary plots of BayesTwin MCMC-objects

Description

plotbayestwin returns either a density or trace plot for the target parameter.

Usage

plotbayestwin(sample, t = "density", main, xlab, ylab, legend = TRUE, lines = TRUE, ...)

Arguments

sample

A vector representing draws from the posterior distribution of the parameter of interest, as produced by the main function IRT_twin of this package

t

Type of plot that is produced, either "density" to get a histogram of the posterior distribution or "trace"to get a trace plot. Default value is "density"

main

An overall title for the plot

xlab

A title for the x axis

ylab

A title for the y axis

legend

Indicating if a legend should be added. Default value is TRUE.

lines

Indicating if lines for mean, median and lower and upper limit of the 95% HPD should be added. Default value is TRUE

...

Further arguments for the generic S3 method histogram (for the density plot) or plot (for the trace plot) method

Details

Creates either a density or trace plot for the target parameter.

The function expects as input a vector representing draws from the posterior distributions of the parameter of interest, as produced by the main function IRT_twin of this package.

Author(s)

Inga Schwabe

Examples

data(results)

##Plot posterior distribution of var(A)
plotbayestwin(results$samples_var_a)


[Package BayesTwin version 1.0 Index]