Learn R Programming

polychaosbasics (version 1.1-0)

polychaosbasics-package: \Sexpr[results=rd,stage=build]{tools:::Rd_package_title("#1")}polychaosbasicsSensitivity Indexes Calculated from Polynomial Chaos Expansions

Description

\Sexpr[results=rd,stage=build]{tools:::Rd_package_description("#1")}polychaosbasicsComputation 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.

Arguments

Details

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.

References

  • 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.

Examples

Run this code
# 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)

Run the code above in your browser using DataLab