Description Usage Arguments Details Value Author(s) References See Also Examples
View source: R/gjamHfunctions.R
Evaluates sensitivity coefficients for full response matrix or subsets of it.
Uses output from gjam
. Returns a matrix
of samples by predictors.
1 2 | gjamSensitivity(output, group=NULL, nsim=100)
|
output |
object fitted with |
group |
|
nsim |
number of samples from posterior distribution. |
Sensitivity to predictors of entire reponse matrix or a subset of it, identified by the character string group
. The equations for sensitivity are given here:
browseVignettes('gjam')
Returns a nsim
by predictor matrix of sensitivities to predictor variables.
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.
gjamSimData
simulates data
A more detailed vignette is can be obtained with:
website 'http://sites.nicholas.duke.edu/clarklab/code/'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | ## Not run:
## combinations of scales
types <- c('DA','DA','OC','OC','OC','OC','CC','CC','CC','CC','CC','CA','CA','PA','PA')
f <- gjamSimData(S = length(types), typeNames = types)
ml <- list(ng = 50, burnin = 5, typeNames = f$typeNames)
out <- gjam(f$formula, f$xdata, f$ydata, modelList = ml)
ynames <- colnames(f$y)
group <- ynames[types == 'OC']
full <- gjamSensitivity(out)
cc <- gjamSensitivity(out, group)
nt <- ncol(full)
boxplot( full, boxwex = 0.25, at = 1:nt - .21, col='blue', log='y',
xaxt = 'n', xlab = 'Predictors', ylab='Sensitivity')
boxplot( cc, boxwex = 0.25, at = 1:nt + .2, col='forestgreen', add=T,
xaxt = 'n')
axis(1,at=1:nt,labels=colnames(full))
legend('bottomright',c('full response','CC data'),
text.col=c('blue','forestgreen'))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.