Learn R Programming

polychaosbasics (version 1.1-0)

polyLeg: Calculate Legendre Polynomials from a Dataset

Description

This function calculates Legendre polynomials on a user LHS. Legendre polynomials are computed after calibration within the bounds [-1, +1].

Usage

polyLeg(lhs, Y, degree)

Arguments

lhs
matrix with as many columns as inputs. Dataset of inputs. Generally, a space filling design is used for forming this dataset. Typically, this is a simple LHS (see McKay, 1979) or a modified LHS.
Y
vector of length equal to the number of rows in lhs. Model outputs.
degree
integer greater than 1. Maximal degree of the polynomial.

Value

An objet of class PCEpoly.

References

McKay, M.D. and Beckman, R.J. and Conover, W.J. 1979. “A Comparison of Three Methods for Selecting Values of Input Variables in the Analysis of Output from a Computer Code”.In Technometrics, 21 (2). 239-245p.

See Also

  • Function analyticsPolyLeg builds Legendre polynomials from a simulated dataset.
  • Function PCESI calculates PCE sensivity indexes from the returned object.

Examples

Run this code
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) 
print(pce)

Run the code above in your browser using DataLab