EuclRandVariable-class {RandVar} | R Documentation |
Euclidean random variable
Description
Class of Euclidean random variables.
Objects from the Class
Objects can be created by calls of the form new("EuclRandVariable", ...)
.
More frequently they are created via the generating function
EuclRandVariable
.
Slots
Map
Object of class
"list"
: list of functions.Domain
Object of class
"OptionalrSpace"
: domain of the random variable.Range
Object of class
"EuclideanSpace"
: range of the random variable.
Extends
Class "RandVariable"
, directly.
Methods
- coerce
signature(from = "EuclRandVariable", to = "EuclRandMatrix")
: create a"EuclRandMatrix"
object from a Euclidean random variable.- coerce
signature(from = "EuclRandVariable", to = "EuclRandVarList")
: create a"EuclRandVarList"
object from a Euclidean random variable.- Range<-
signature(object = "EuclRandVariable")
: replacement function for the slotRange
.- [
signature(x = "EuclRandVariable")
: generates a new Euclidean random variable by extracting elements of the slotMap
ofx
.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "numeric", distr = "missing")
: evaluate the slotMap
ofRandVar
atx
.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "matrix", distr = "missing")
: evaluate the slotMap
ofRandVar
at rows ofx
.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "numeric", distr = "Distribution")
: evaluate the slotMap
ofRandVar
atx
assuming a probability space with distributiondistr
. In casex
does not lie in the support ofdistr
NA
is returned.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "matrix", distr = "Distribution")
: evaluate the slotMap
ofRandVar
at rows ofx
assuming a probability space with distributiondistr
. For those rows ofx
which do not lie in the support ofdistr
NA
is returned.- imageDistr
signature(RandVar = "EuclRandVariable", distr = "Distribution")
: image distribution ofdistr
underRandVar
. Returns an object of class"DistrList"
.- dimension
signature(object = "EuclRandVariable")
: dimension of the Euclidean random variable.- t
signature(x = "EuclRandVariable")
: returns an object of class"EuclRandMatrix"
where the rhe results of the functions in the slotMap
ofx
are transposed.- %*%
signature(x = "matrix", y = "EuclRandVariable")
: matrix multiplication ofx
andy
. Generates an object of class"EuclRandMatrix"
.- %*%
signature(x = "EuclRandVariable", y = "matrix")
: matrix multiplication ofx
andy
. Generates an object of class"EuclRandMatrix"
.- %*%
signature(x = "numeric", y = "EuclRandVariable")
: generates an object of class"EuclRandMatrix"
(1 x 1 matrix) by multiplying (scalar/innner product)x
andy
.- %*%
signature(x = "EuclRandVariable", y = "numeric")
: generates an object of class"EuclRandMatrix"
(1 x 1 matrix) by multiplying (scalar/innner product)x
andy
.- %*%
signature(x = "EuclRandVariable", y = "EuclRandVariable")
: generates an object of class"EuclRandMatrix"
(1 x 1 matrix) by multiplying (scalar/innner product)x
andy
.- %*%
signature(x = "EuclRandVariable", y = "EuclRandMatrix")
: matrix multiplication ofx
andy
. Generates an object of class"EuclRandMatrix"
.- %*%
signature(x = "EuclRandMatrix", y = "EuclRandVariable")
: matrix multiplication ofx
andy
. Generates an object of class"EuclRandMatrix"
.- Arith
signature(e1 = "numeric", e2 = "EuclRandVariable")
: Given a numeric vectore1
, a Euclidean random variablee2
and an arithmetic operatorop
, the Euclidean random variablee1 op e2
is returned.- Arith
signature(e1 = "EuclRandVariable", e2 = "numeric")
: Given a numeric vectore2
, a Euclidean random variablee1
and an arithmetic operatorop
, the Euclidean random variablee1 op e2
is returned.- Arith
signature(e1 = "EuclRandVariable", e2 = "EuclRandVariable")
: Given two Euclidean random variablese1
,e2
and an arithmetic operatorop
, the Euclidean random variablee1 op e2
is returned.- Math
signature(x = "EuclRandVariable")
: Given a"Math"
group genericfct
, the Euclidean random variablefct(x)
is returned.- E
signature(object = "UnivariateDistribution", fun = "EuclRandVariable", cond = "missing")
: expectation offun
under univariate distributions.- E
signature(object = "AbscontDistribution", fun = "EuclRandVariable", cond = "missing")
: expectation offun
under absolutely continuous univariate distributions.- E
signature(object = "DiscreteDistribution", fun = "EuclRandVariable", cond = "missing")
: expectation offun
under discrete univariate distributions.- E
signature(object = "MultivariateDistribution", fun = "EuclRandVariable", cond = "missing")
: expectation offun
under multivariate distributions.- E
signature(object = "DiscreteMVDistribution", fun = "EuclRandVariable", cond = "missing")
: expectation offun
under discrete multivariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric")
: conditional expectation offun
under conditional univariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric")
: conditional expectation offun
under absolutely continuous conditional univariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric")
: conditional expectation offun
under discrete conditional univariate distributions.
Author(s)
Matthias Kohl Matthias.Kohl@stamats.de
See Also
EuclRandVariable
, RandVariable-class
,
EuclRandMatrix-class
, EuclRandVarList-class
,
Distribution-class
, Arith
,
Math
, E
Examples
L1 <- list(function(x){x}, function(x){x^2}, function(x){x^3}, function(x){x^4})
L2 <- list(function(x){exp(x)}, function(x){abs(x)},
function(x){sin(x)}, function(x){floor(x)})
R1 <- new("EuclRandVariable", Map = L1, Domain = Reals(), Range = Reals())
dimension(R1)
Map(R1)
Range(R1)
R1[2]
Map(R1[3])
Map(R1[c(1,2,4)])
Map(R1[2:4])
set.seed(123)
evalRandVar(R1, rnorm(1))
x <- as.matrix(rnorm(10))
res.R1 <- evalRandVar(R1, x)
res.R1[2,,] # results for Map(R1)[[2]](x)
res.R1[2,1,] # results for Map(R1)[[2]](x[1,])
R2 <- EuclRandVariable(L2, Domain = Reals(), dimension = 1)
dimension(R2)
DL1 <- imageDistr(R2, Norm())
plot(DL1)
Domain(R2) <- EuclideanSpace(dimension = 2)
Range(R2) <- EuclideanSpace(dimension = 2)
dimension(R2)
(X <- matrix(c(x, rnorm(10)), ncol = 2))
res.R2 <- evalRandVar(R2, X)
res.R2[3,,1] # results for Map(R2)[[3]](X[,1])
Map(log(abs(R2))) # "Math" group generic
# "Arith" group generic
Map(3 + R1)
Map(c(1,3,5) * R1)
try(1:5 * R1) # error
Map(1:2 * R2)
Map(R2 - 5)
Map(R1 ^ R1)