setDistributionParameters-methods: The 'setDistributionParameters' method

Description Usage Arguments Value Author(s) Examples

Description

Sets the parameters of the distribution associated with a factor's domain.

Usage

1
setDistributionParameters(this, aDistParamList)

Arguments

this

the underlying object of the class mtkDomain.

aDistParamList

a list of objects of class mtkParameter or a named list from which we can build a list of objects of class mtkParameter .

Value

invisible()

Author(s)

Juhui WANG, MIA-jouy, INRA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 1)  Build an object of the "mtkDomain" class
	d <- mtkDomain(distributionName="unif", domainNominalValue=0)
	
	## Define the parameters
	p <- make.mtkParameterList(list(min=-pi, max=pi))
	
	## Assign the parameters to the mtkDomain's object

	setDistributionParameters(d, p)
# 2) Build an object of the "mtkDomain" class
	d <- mtkDomain(distributionName="unif", domainNominalValue=0)
	
	## Assign the parameters to the mtkDomain's object

	setDistributionParameters(d, list(min=-pi, max=pi))

# 3) Build an object of the "mtkDomain" class with a discrete distribution
	d <- mtkDomain(distributionName="discrete", domainNominalValue=0)

	## Assign the parameters to the mtkDomain's object

	setDistributionParameters(d, list(type='categorical', levels=seq(1:3), weights=rep(0.33,3)))

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