Learn R Programming

mtk (version 1.0)

BasicMonteCarlo: The BasicMonteCarlo design method

Description

A native mtk design method to generate Monte Carlo samples.

Arguments

Usage

  • mtkBasicMonteCarloDesigner(listParameters=NULL)
  • mtkNativeDesigner(design="BasicMonteCarlo", information=NULL)

Parameters

size :
the sample size.

Details

  1. The mtk implementation of the Basic Monte-Carlo method includes the following classes:
    • mtkBasicMonteCarloDesigner for Basic Monte-Carlo design processes.
    • mtkBasicMonteCarloDesignerResult to store and manage the design.
  2. Many ways to create a Basic Monte-Carlo designer are available in mtk, but we recommend the following class constructors: mtkBasicMonteCarloDesigner or mtkNativeDesigner.

References

  1. A. Saltelli, K. Chan and E. M. Scott (2000). Sensitivity Analysis. Wiley, New York.
  2. J. Wang, H. Richard, R. Faivre, H. Monod (2013). Le package mtk, une bibliothèque R pour l'exploration numérique des modèles. In: Analyse de sensibilité et exploration de modèles : Application aux sciences de la nature et de l'environnement (R. Faivre, B. Iooss, S. Mahévas, D. Makowski, H. Monod, Eds). Editions Quae, Versailles.

Examples

Run this code

## Experiments design with the "Basic Monte-Carlo" method for the "Ishigami" model

#	Example I: by using the class constructors: mtkBasicMonteCarloDesigner()

# 	1) Create a designer process based on the Basic Monte-Carlo method 
		MCdesign <- mtkBasicMonteCarloDesigner(listParameters = list(size=20))

# 	2) Import the input factors of the "Ishigami" model
		data(Ishigami.factors)

# 	3) Build and run the  workflow 
		exp1 <- mtkExpWorkflow(expFactors = Ishigami.factors,
	               processesVector = c(design=MCdesign)) 
		run(exp1)

# 	4) Report and plot the design
    		show(exp1)
    		plot(exp1)	
	
#	Example II: by using the class constructors: mtkNativeDesigner()

# 	1) Create a designer process based on the Basic Monte-Carlo method 
		MCdesign <- mtkNativeDesigner("BasicMonteCarlo", information = list(size=20))

# 	2) Import the input factors of the "Ishigami" model
		data(Ishigami.factors)

# 	3) Build and run the  workflow 
		exp1 <- mtkExpWorkflow(expFactors = Ishigami.factors,
	               processesVector = c(design=MCdesign)) 
		run(exp1)

# 	4) Print and plot the design
		print(exp1)
		plot(exp1)	

Run the code above in your browser using DataLab