# 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)
ylim <- range(rbind(full, cc))
boxplot( full, boxwex = 0.25, at = 1:nt - .21, col='blue', log='y',
ylim = ylim, 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('bottomleft',c('full response','CC data'),
text.col=c('blue','forestgreen'))
# }
Run the code above in your browser using DataLab