plotPosterior {graper} | R Documentation

## Plot posterior distributions

### Description

Function to plot the posterior of the model parameters obtained by graper from the variational inference framework.

### Usage

    plotPosterior(fit, param2plot, beta0 = NULL, gamma0 = NULL,
        tau0 = NULL, pi0 = NULL, s0 = NULL, jmax = 2, range = NULL)

### Arguments

`fit` | fit as produced by `graper`
`param2plot` | which parameter of the graper model to plot (gamma, beta, tau or s)
`beta0` | true beta (if known)
`gamma0` | true gamma (if known)
`tau0` | true tau (if known)
`pi0` | true pi (if known)
`s0` | true s (if known)
`jmax` | maximal number of components per group to plot (for beta and s)
`range` | plotting range (x-axis)

### Value

a ggplot object

### Examples

    dat <- makeExampleData()
    fit <- graper(dat$X, dat$y, dat$annot)
    plotPosterior(fit, param2plot="gamma")

[Package graper version 1.0.0 Index]