Computation of sensitivity indexes by using a method based on a truncated Polynomial Chaos Expansions of the response. The necessary condition of the method is: the inputs must be uniformly and independently sampled. Since the inputs are uniformly distributed, the truncated Polynomial Chaos Expansion is built from the multivariate Legendre orthogonal polynomials.

Legendre chaos polynomials are calculated on a
provided dataset by function `polyLeg`

or on a simulated LHS by function `analyticsPolyLeg`

.

Then, from the object returned by these functions,
the `PCESI`

function calculates
sensitivity indexes, metamodel coefficients and some other
results.

A. Bouvier [aut], J.-P. Gauchi [cre], A. Bensadoun [aut]

Maintainer: Annie Bouvier <annie.bouvier@jouy.inra.fr>

Metamodeling and global sensitivity analysis for computer models with correlated inputs: a practical approach tested with a 3D light interception computer model. J.-P. Gauchi et all. In

*Environmental Modelling \& Software*, 2016, submitted.-
Global sensitivity analysis using polynomial chaos expansions. Bruno Sudret. In

*Reliability Engineering and System Safety*, Vol. 93, Issue 7, July 2008, pages 964-979.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ```
# First example:
# the dataset is simulated by using the Ishigami function
nlhs <- 200 # number of rows
degree <- 6 # polynomial degree
set.seed(42)# fix the seed for reproductible results
pce <- analyticsPolyLeg(nlhs, degree, 'ishigami') # build Legendre polynomial
ret <- PCESI(pce) # compute the PCE sensitivity indexes
print(ret)
# Illustrate the result by a plot:
# plot the computer model output against the metamodel output
y.hat <- ret@y.hat # metamodel output
y.obs <- pce[, "Y"] # computer model output
## Not run:
X11()
plot(y.hat, y.obs,
xlab="metamodel output", ylab="computer model output",
main="Ishigami test", sub="Scatter plot and regression line")
# Add the regression line
reg <- lm(y.hat ~ y.obs) # linear regression
lines(reg$fitted.values, y.obs)
## End(Not run)
# Second example:
# the dataset is a user dataset
load(system.file("extdata", "FLORSYS1extract.Rda",
package="polychaosbasics"))
degree <- 4 # polynomial degree
lhs <- FLORSYS1extract[, -ncol(FLORSYS1extract)] # inputs
Y <- FLORSYS1extract[,ncol(FLORSYS1extract)] # output
pce <- polyLeg(lhs, Y, degree) # build Legendre polynomial
ret <- PCESI(pce) # compute the PCE sensitivity indexes
print(ret, all=TRUE)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.