gjamIIEplot | R Documentation |
Using the object returned by gjamIIEplot
generates a plot for a response variable.
gjamIIEplot(fit, response, effectMu, effectSd = NULL, ylim = NULL, col='black', legLoc = 'topleft', cex = 1)
fit |
object from |
response |
name of a column in fit$y to plot. |
effectMu |
character vector of mean effects to plot, can include |
effectSd |
character vector can include all or some of |
ylim |
vector of two values defines vertical axis range. |
col |
vector of colors for barplot. |
legLoc |
character for legend location. |
cex |
font size. |
For plotting direct effects, interactions, and indirect effects from an object fit
generated by gjamIIE
. The character vector supplied as effectMu
can include main effects ('main'
), interactions ('int'
), main effects plus interactions ('direct'
), and/or indirect effects ('ind'
). The list effectSd
draws 0.95 predictive intervals for all or some of the effects listed in effectM
u. Bars are contributions of each effect to the response
.
For factors, effects are plotted relative to the mean over all factor levels.
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.
gjamIIE
generates output for gjamIIEplot
A more detailed vignette is can be obtained with:
browseVignettes('gjam')
web site 'http://sites.nicholas.duke.edu/clarklab/code/'.
## Not run: f <- gjamSimData(S = 10, Q = 6, typeNames = 'OC') ml <- list(ng = 50, burnin = 5, typeNames = f$typeNames) out <- gjam(f$formula, f$xdata, f$ydata, modelList = ml) xvector <- colMeans(out$inputs$xStand) #predict at mean values for data, standardized x xvector[1] <- 1 fit <- gjamIIE(out, xvector) gjamIIEplot(fit, response = 'S1', effectMu = c('main','ind'), effectSd = c('main','ind'), legLoc = 'topleft') ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.