mtkExperiment-class: The 'mtkExperiment' class

Description Class Hierarchy Constructor Slots Methods Author(s) References Examples

Description

The class mtkExperiment is a sub-class of the class mtkExpWorkflow. It provides more facilities and more flexible use for interactive manipulation of the workflow. Different behaviors may be expected by appropriately combining the parameters: design – the method used for the experiment design; model – the model used for the simulation; analyze – the method used for calculating the sensitivity index; XY – argument used to provide with data produced off-line;

For example, 1) if the experiment design is produced off-line, it will be imported with the help of the parameter "XY$X" ; 2) if the model simulation is produced off-line, it will be imported through the parameter "XY$Y";

Class Hierarchy

Parent classes :

mtkExpWorkflow

Direct Known Subclasses :

Constructor

mtkExperiment

signature(expFactors, design=NULL, designInfo=NULL, model=NULL, modelInfo=NULL, analyze=NULL, analyzeInfo=NULL, XY=NULL)

Slots

expFactors:

(mtkExpFactors) an object of the mtkExpFactors class.

processesVector:

(vector) a vector of objects from the class mtkProcess or its sub-classes.

Methods

addProcess

signature(this = "mtkExperiment", p = "mtkProcess", name = "character"): Adds a process to the workflow.

deleteProcess

signature(this = "mtkExperiment", name = "character"): Deletes a process from the workflow.

setProcess

signature(this = "mtkExperiment", p = "mtkProcess", name = "character"): Replaces a process into the workflow.

getProcess

signature(this = "mtkExperiment", name = "character"): Gets a process from the workflow.

extractData

signature(this = "mtkExperiment", name = "list"): Returns the results produced by the workflow as a data.frame. According to the processes specified with the argument "name", we can fetch the results produced by the process "design", "evaluate" or "analyze". i.e. name=c("design") gives the experimental design produced by the process "design" and name=c("design","evaluate") gives both the experimental design and the model simulation, etc.

reevaluate

signature(this = "mtkExperiment", name = "character"): Re-evaluate the processes of the workflow to know if they should be re-run. This should be done after changing a process of the workflow. According to the order "design", evaluate", "analyze", only the processes after the one given by the argument "name" will be re-evaluated.

run

signature(this = "mtkExperiment", context= "missing"): Runs the ExpWorkflow.

serializeOn

signature(this = "mtkExperiment"): Returns all data managed by the workflow as a named list.

summary

signature(object = "mtkExperiment"): Provides a summary of the results produced by the workflow.

print

signature(x = "mtkExperiment"): Prints a report of the results produced by the workflow.

plot

signature(x = "mtkExperiment"): Plots the results produced by the workflow.

report

signature(this = "mtkExperiment"): Reports the results produced by the workflow.

Author(s)

Juhui WANG, MIA-Jouy, Inra, Juhui.Wang@jouy.inra.fr

References

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Compute the sensitivity index with the method "Regression" 
# over the model "Ishigami" according to an experiment design
# generated with the method "BasicMonteCarlo"

	x1 <- make.mtkFactor(name="x1", distribName="unif",
		 distribPara=list(min=-pi, max=pi))
	x2 <- make.mtkFactor(name="x2", distribName="unif",
    	 distribPara=list(min=-pi, max=pi))
	x3 <- make.mtkFactor(name="x3", distribName="unif", 
    	 distribPara=list(min=-pi, max=pi))
	factors <- mtkExpFactors(list(x1,x2,x3))

	exp <- mtkExperiment(
		factors, 
		design = 'BasicMonteCarlo',
		designInfo=list(size=20),
		model = 'Ishigami', 
		analyze = 'Regression', 
		analyzeInfo = list(ntboot=20)
		)
	run(exp)
	summary(exp)

mtk documentation built on May 2, 2019, 4:15 a.m.