Learn R Programming

mtk (version 1.0)

Sobol: The Sobol Method

Description

A mtk compliant implementation of the Sobol' method for design of experiments and sensitivity analysis.

Arguments

Usage

  • mtkSobolDesigner(listParameters = NULL)
  • mtkNativeDesigner(design="Sobol", information=NULL)
  • mtkSobolAnalyser(listParameters = NULL)
  • mtkNativeAnalyser(analyze="Sobol", information=NULL)

Parameters

N:
the size of the basic samples; the final sample size will be N*(k+2) where k is the number of the factors to analyze.
nboot:
the number of bootstrap replicates (default 0). See the help on function sobol2002 in the package sensitivity.
conf:
the confidence level for bootstrap confidence intervals (default 0.95). See the help on function sobol2002 in the package sensitivity.
sampling:
character string specifying the type of sampling method: "MC" (default) for Monte Carlo sampling, "LHS" for Latin Hypercube sampling.
shrink:
a scalar or a vector of scalars between 0 and 1 (default 1), specifying shrinkage to be used on the probabilities before calculating the quantiles.

Details

  1. The mtk implementation uses the sobol2002 function of the sensitivity package. For further details on the arguments and the behavior, see help(sobol2002, sensitivity).
  2. The mtk implementation of the Sobol' method includes the following classes:
    • mtkSobolDesigner: for the Sobol design processes.
    • mtkSobolAnalyser: for Sobol analysis processes.
    • mtkSobolDesignerResult: to store and manage the design.
    • mtkSobolAnalyserResult: to store and manage the analysis results.
  3. Many ways to create a Sobol designer are available in mtk, but we recommend the following class constructors: mtkSobolDesigner or mtkNativeDesigner.
  4. Many ways to create a Sobol analyser are available in mtk, but we recommend the following class constructors: mtkSobolAnalyser or mtkNativeAnalyser.
  5. The Sobol' method is usually used both to build the experiment design and to carry out the sensitivity analysis. In such case, we can use the mtkDefaultAnalyser instead of naming explicitly the method for sensitivity analysis (see example III in the examples section)

References

A. Saltelli, K. Chan and E. M. Scott (2000). Sensitivity Analysis. Wiley, New York

See Also

help(sobol2002, sensitivity), Quantiles

Examples

Run this code

## Sensitivity analysis of the "Ishigami" model with the "Sobol" method 

#	Example I: by using the class constructors: mtkSobolDesigner() and mtkSobolAnalyser()

#	Generate the factors
		data(Ishigami.factors)
		
# 	Build the processes and workflow:

#   1) the design process
		exp1.designer <- mtkSobolDesigner( listParameters = list(N=100)) 

#   2) the simulation process
		exp1.evaluator <- mtkNativeEvaluator(model="Ishigami") 

#   3) the analysis process 
  	exp1.analyser <- mtkSobolAnalyser()

#   4) the workflow

		exp1 <- mtkExpWorkflow(expFactors=Ishigami.factors,
	    processesVector = c(design=exp1.designer, 
	    					evaluate=exp1.evaluator, 
	    					analyze=exp1.analyser))

# 	Run the workflow and reports the results.
		run(exp1)
		print(exp1)
		plot(exp1)
    
## 	Example II:  by using the class constructors: mtkNativeDesigner() and mtkSobolAnalyser()

#	Generate the factors
		data(Ishigami.factors)
		
# 	Build the processes and workflow:

#   1) the design process
		exp1.designer <- mtkNativeDesigner(design = "Sobol", information = list(N=10)) 

#   2) the simulation process
		exp1.evaluator <- mtkNativeEvaluator(model="Ishigami") 

#   3) the analysis process with the default method
		exp1.analyser <- mtkSobolAnalyser()

#   4) the workflow

		exp1 <- mtkExpWorkflow(expFactors=Ishigami.factors,
	    processesVector = c(design=exp1.designer, 
	    					evaluate=exp1.evaluator, 
	    					analyze=exp1.analyser))

# 	Run the workflow and reports the results.
		run(exp1)
		print(exp1)
    plot(exp1)
		

## 	Example III:  by using the class constructors: mtkSobolDesigner() and mtkDefaultAnalyser()

#	Generate the factors
		data(Ishigami.factors)
		
# 	Build the processes and workflow:

#   1) the design process
		exp1.designer <- mtkSobolDesigner( listParameters = list(N=10))  

#   2) the simulation process
		exp1.evaluator <- mtkNativeEvaluator(model="Ishigami") 

#   3) the analysis process with the default method
		exp1.analyser <- mtkDefaultAnalyser()

#   4) the workflow

		exp1 <- mtkExpWorkflow(expFactors=Ishigami.factors,
	    processesVector = c(design=exp1.designer, 
	    					evaluate=exp1.evaluator, 
	    					analyze=exp1.analyser))

# 	Run the workflow and reports the results.

    run(exp1)
    print(exp1)
    plot(exp1)

Run the code above in your browser using DataLab