# get the example directory name
path <- system.file( "extdata/sobol", package = "LSDsensitivity" )
# Steps to use this function:
# 1. define the variables you want to use in the analysis
# 2. load data from a LSD simulation saved results using read.doe.lsd,
# preferrably using two sets of sampled data (DoEs), one for model
# estimation and the other for out-of-sample (external) validation
# 3. fit the polynomial meta-model using polynomial.model.lsd
lsdVars <- c( "var1", "var2", "var3" ) # the definition of existing variables
dataSet <- read.doe.lsd( path, # data files folder
"Sim3", # data files base name (same as .lsd file)
"var3", # variable name to perform the sensitivity analysis
does = 2, # number of experiments (data + external validation)
saveVars = lsdVars ) # LSD variables to keep in dataset
model <- polynomial.model.lsd( dataSet ) # estimate best polynomial meta-model
# using defaults (auto model selection)
print( model$comparison ) # model comparison table
print( model$estimation.std ) # model estimation (standardized) table
Run the code above in your browser using DataLab