sensitivity.plot: Plot the sensitivity indices of a smooth supersaturated...

Description Usage Arguments Details Examples

View source: R/sensitivity_SSM.R

Description

sensitivity.plot visualises the sensitivity indices of a given smooth supersaturated model using barplot. If the SA flag was not set to TRUE when fit.ssm was run to fit the model, then update.sensitivity should be used to compute the model variances. If not, this function will return an error message.

Usage

1
sensitivity.plot(ssm, type = "main_total", ...)

Arguments

ssm

An SSM object. Must have relevant sensitivity indices in the appropriate slots, either from setting SA = TRUE in fit.ssm or by using update.sensitivity.

type

(optional) Character. Determines the type of barplot. One of "sobol", "main_sobol", "main_total", or "total". Default behaviour is "main_total".

...

arguments passed to the barplot function call.

Details

There are four classes of plot available:

Note that variables and interactions are not labelled in the plots since there can be too many bars to label clearly.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# A 20 point design in four variables
X <- matrix(runif(80, -1, 1), ncol = 4)
Y <- runif(20)
s <- fit.ssm(X, Y, SA = TRUE)
sensitivity.plot(s)

# In the next plots, the grey bars indicate interactions.
sensitivity.plot(s, "sobol")
sensitivity.plot(s, "total")
# Identifying particular indices is best done using the information held in
# the SSM object.  The following orders s@total_int_factors so the
# interaction indicated by the top row is the most important.
ind <- order(s@total_int, decreasing = TRUE)
s@total_int_factors[ind, ]

Example output

Computing Sobol indices assuming inputs are uniformly distributed
        over [-1,1]^d using Legendre polynomials.

Computing main effects.

Computing total effects.

Computing total interaction indices.

Computing Sobol indices for all order interactions.
Computing total interaction indices.
     [,1] [,2]
[1,]    2    3
[2,]    3    4
[3,]    1    3
[4,]    1    2
[5,]    1    4
[6,]    2    4

SSM documentation built on May 1, 2019, 10:09 p.m.