gjamPlot | R Documentation |
Constructs plots of posterior distributions, predictive distributions,
and additional analysis from output of gjam
.
gjamPlot(output, plotPars)
output |
object of |
plotPars |
|
plotPars
a list
that can contain the following, listed with default values:
PLOTY = T | plot predicted y . |
PLOTX = T | plot inverse predicted x . |
PREDICTX = T | inverse prediction of x ; does not work if PREDICTX = F in link{gjam} . |
ncluster | number of clusters to highlight in
cluster diagrams, default based on S . |
CORLINES = T | draw grid lines on grid plots of R and E. |
cex = 1 | text size for grid plots, see par . |
BETAGRID = T | draw grid of beta coefficients. |
PLOTALLY = F | an individual plot for each column in y . |
SMALLPLOTS = T | avoids plot margin error on some devices, better appearance if FALSE . |
GRIDPLOTS = F | cluster and grid plots derived from parameters; matrices R and E are discussed in Clark et al. (2016). |
SAVEPLOTS = F | plots saved in pdf format. |
outfolder = 'gjamOutput' | folder for plot files if SAVEPLOTS = T . |
width, height = 4 | can be small values, in inches, to avoid plot margin error on some devices. |
specColor = 'black' | color for posterior box-and-whisker plots. |
ematAlpha = .95 | prob threshold used to infer that a covariance value in Emat is not zero. |
ncluster = 4 | number of clusters to identify in ematrix . |
The 'plot margin' errors mentioned above are device-dependent. They can be avoided by specifying small width, height
(in inches) and by omitting the grid plots (GRIDPLOTS = F
). If plotting does not produce a 'plot margin error', better appearance is obtained with SMALLPLOTS = F
.
Names will not be legible for large numbers of species. Specify specLabs = F
and use a character vector for specColor
to identify species groups (see the gjam vignette on dimension reduction).
Box and whisker plots bound 0.68 and 0.95 credible and predictive intervals.
Summary tables of parameter estimates are:
|
Posterior summary of beta coefficients. |
|
cluster index for responses in grid/cluster plots. |
|
order for responses in grid/cluster plots. |
|
groups based on clustering |
|
|
|
eigenvalues of |
|
eigenvectors of |
|
|
James S Clark, jimclark@duke.edu
Clark, J.S., D. Nemergut, B. Seyednasrollah, P. Turner, and S. Zhang. 2017. Generalized joint attribute modeling for biodiversity analysis: Median-zero, multivariate, multifarious data. Ecological Monographs 87, 34-56.
gjam
A more detailed vignette is can be obtained with:
browseVignettes('gjam')
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
## Not run: ## ordinal data f <- gjamSimData(S = 15, Q = 3, typeNames = 'OC') ml <- list(ng = 1500, burnin = 500, typeNames = f$typeNames, holdoutN = 10) out <- gjam(f$formula, f$xdata, f$ydata, modelList = ml) # repeat with ng = 2000, burnin = 500, then plot data here: pl <- list(trueValues = f$trueValues, width=3, height=2) fit <- gjamPlot(output = out, plotPars = pl) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.