gjamSensitivity: Sensitivity coefficients for gjam

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/gjamHfunctions.R

Description

Evaluates sensitivity coefficients for full response matrix or subsets of it. Uses output from gjam. Returns a matrix of samples by predictors.

Usage

1
2
  gjamSensitivity(output, group=NULL, nsim=100)
  

Arguments

output

object fitted with gjam.

group

character vector of response-variable names from output$inputs$y.

nsim

number of samples from posterior distribution.

Details

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')

Value

Returns a nsim by predictor matrix of sensitivities to predictor variables.

Author(s)

James S Clark, jimclark@duke.edu

References

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.

See Also

gjamSimData simulates data

A more detailed vignette is can be obtained with:

browseVignettes('gjam')

website 'http://sites.nicholas.duke.edu/clarklab/code/'.

Examples

 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)

dbystrova/GJAM_clust documentation built on Sept. 15, 2020, 5:46 p.m.