Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

visbeta

Format scores output for visualization


Description

Format scores output for visualization

Usage

visbeta(mcmc.output, Y, D, chain = 1, axes = c(1, 2), quant = NULL)

Arguments

mcmc.output

an mcmc list as produced by clean.mcmc

Y

the matrix of data

D

the number of latent factors

chain

the chain to use (default = 1)

axes

the axes to use (default = c(1, 2))

quant

a vector of quantiles to retain (default = NULL)

Value

mean.df are the MCMC estimates for the parmeters

points.df contains all of the estimates of the chain

contour.df contains the exterior points of the convex hull of the cloud of estimates

Author(s)

Gabrielle Weinrott

Examples

data("toydata")
data("stanfit")
codafit <- coda.obj(stanfit) ## convert to mcmc.list
beta.res <- visbeta(codafit, Y = toydata$Y.simul$Y, D = toydata$wlu$D, chain = 1,
axes = c(1, 2), quant = c(0.05, 0.95))

ggplot2::ggplot() +
  ggplot2::geom_path(data = beta.res$contour.df, ggplot2::aes(x = x, y = y, colour = ind)) +
  ggplot2::geom_point(data = beta.res$mean.df, ggplot2::aes(x = x, y = y, colour = ind))

DrBats

Data Representation: Bayesian Approach That's Sparse

v0.1.5
GPL-3
Authors
Anne Bisson [cre], Gabrielle Weinrott [aut], Brigitte Charnomordic [aut], Benedicte Fontez [aut], Nadine Hilgert [aut], Susan Holmes [aut]
Initial release
2019-11-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.