RandVariable-class {RandVar} | R Documentation |
Random variable
Description
Class of random variables; i.e., measurable maps from
Domain
to Range
. The elements contained in
the list Map
are functions in one(!) argument named “x”.
Objects from the Class
Objects can be created by calls of the form new("RandVariable", ...)
.
More frequently they are created via the generating function
RandVariable
.
Slots
Map
Object of class
"list"
: list of functions.Domain
Object of class
"OptionalrSpace"
: domain of the random variable.Range
Object of class
"OptionalrSpace"
: range of the random variable.
Methods
- Map
signature(object = "RandVariable")
: accessor function for the slotMap
.- Domain
signature(object = "RandVariable")
: accessor function for the slotDomain
.- Range
signature(object = "RandVariable")
: accessor function for the slotRange
.- Map<-
signature(object = "RandVariable")
: replacement function for the slotMap
.- Domain<-
signature(object = "RandVariable")
: replacement function for the slotDomain
.- Range<-
signature(object = "RandVariable")
: replacement function for the slotRange
.- compatibleDomains
signature(e1 = "RandVariable", e2 = "RandVariable")
: test if the domains of two random variables are compatible.- length
signature(object = "RandVariable")
: length of the list of functions in slotMap
.- show
signature(object = "RandVariable")
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de
See Also
RandVariable
, EuclRandVariable-class
,
EuclRandMatrix-class
, EuclRandVarList-class
Examples
(R1 <- new("RandVariable"))
Map(R1)
Domain(R1)
Range(R1)
Map(R1) <- list(function(x){ceiling(x)}, function(x){floor(x)})
Domain(R1) <- Reals()
Range(R1) <- Naturals()
R1
Map(R1)
length(R1)
R2 <- R1
Domain(R2) <- Naturals()
compatibleDomains(R1, R2)
Domain(R2) <- NULL
compatibleDomains(R1, R2)
Domain(R2) <- EuclideanSpace(dimension = 1)
compatibleDomains(R1, R2)
Domain(R2) <- EuclideanSpace(dimension = 2)
compatibleDomains(R1, R2)