plot_prior {ggdmc} | R Documentation |
Plot prior distributions
Description
plot_prior
plots one member in a prior object. plot.prior
plots all members in a prior object.
Usage
plot_prior(i, prior, xlim = NA, natural = TRUE, npoint = 100,
trans = NA, save = FALSE, ...)
## S3 method for class 'prior'
plot(x, save = FALSE, ps = NULL, ...)
Arguments
i |
an integer or a character string indicating which parameter to plot |
prior |
a prior object |
xlim |
set the range of on x axis. This is usually the range for each parameter. |
natural |
default TRUE. |
npoint |
default to plot 100 |
trans |
default NA. trans can be a scalar or vector. |
save |
whether to save the data out |
... |
other plotting arguments passing through dot dot dot. |
x |
a prior object |
ps |
true parameter vectors or matrix in the case of many observation units |
Examples
p.prior <- BuildPrior(
dists = rep("tnorm", 7),
p1 = c(a = 2, v.f1 = 4, v.f2 = 3, z = 0.5, sv = 1,
sz = 0.3, t0 = 0.3),
p2 = c(a = 0.5, v.f1 = .5, v.f2 = .5, z = 0.1, sv = .3,
sz = 0.1, t0 = 0.05),
lower = c(0,-5, -5, 0, 0, 0, 0),
upper = c(5, 7, 7, 1, 2, 1, 1))
plot_prior("a", p.prior)
plot_prior(2, p.prior)
plot(p.prior)
[Package ggdmc version 0.2.6.0 Index]