make.mtkFactor: The 'make.mtkFactor' function

Description Usage Arguments Details Value Author(s) Examples

View source: R/mtkFactor.R

Description

Creates a new input factor and specifies its uncertainty distribution.

Usage

1
2
3
make.mtkFactor(name="unkown", id="unkown", unit="", type="",
		 nominal=NA, distribName='unknown', distribPara=list(), features=list())
	 

Arguments

name

the name of the input factor.

id

the name of the factor in the simulation code, if different from name (optional).

unit

the measurement unit of the factor values (optional). This can be used in graphics or reports, for example.

type

the data-type of the factor's values (optional).

nominal

the nominal value of the factor.

distribName

the name of the probability distribution describing the factor's uncertainty.

distribPara

the list of distribution parameters.

features

the list of factor's features.

Details

The distribName argument must use the R terminology, for example norm for the normal distribution or unif for the uniform one; see help(distributions).

Value

an object of class mtkFactor.

Author(s)

Juhui WANG, MIA-jouy, INRA, Herv<c3><a9> Richard, BioSP, Inra, [email protected], Herv<c3><a9> Monod

Examples

1
2
3
4
5
6
7
8
# Define a new continuous factor 
	make.mtkFactor("A", distribName="unif", distribPara=list(min=0,max=1))
# Define a new discrete factor 
	make.mtkFactor("D", distribName="discrete", distribPara =
				list(type='categorical', levels=c('a','b','c'), 
				weights=rep(0.33,3))
				)
	

mtk documentation built on May 29, 2017, 5:34 p.m.