| 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
MapObject of class
"list": list of functions.DomainObject of class
"OptionalrSpace": domain of the random variable.RangeObject 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 slotMapofx.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "numeric", distr = "missing"): evaluate the slotMapofRandVaratx.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "matrix", distr = "missing"): evaluate the slotMapofRandVarat rows ofx.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "numeric", distr = "Distribution"): evaluate the slotMapofRandVaratxassuming a probability space with distributiondistr. In casexdoes not lie in the support ofdistrNAis returned.- evalRandVar
signature(RandVar = "EuclRandVariable", x = "matrix", distr = "Distribution"): evaluate the slotMapofRandVarat rows ofxassuming a probability space with distributiondistr. For those rows ofxwhich do not lie in the support ofdistrNAis returned.- imageDistr
signature(RandVar = "EuclRandVariable", distr = "Distribution"): image distribution ofdistrunderRandVar. 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 slotMapofxare transposed.- %*%
signature(x = "matrix", y = "EuclRandVariable"): matrix multiplication ofxandy. Generates an object of class"EuclRandMatrix".- %*%
signature(x = "EuclRandVariable", y = "matrix"): matrix multiplication ofxandy. 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)xandy.- %*%
signature(x = "EuclRandVariable", y = "numeric"): generates an object of class"EuclRandMatrix"(1 x 1 matrix) by multiplying (scalar/innner product)xandy.- %*%
signature(x = "EuclRandVariable", y = "EuclRandVariable"): generates an object of class"EuclRandMatrix"(1 x 1 matrix) by multiplying (scalar/innner product)xandy.- %*%
signature(x = "EuclRandVariable", y = "EuclRandMatrix"): matrix multiplication ofxandy. Generates an object of class"EuclRandMatrix".- %*%
signature(x = "EuclRandMatrix", y = "EuclRandVariable"): matrix multiplication ofxandy. Generates an object of class"EuclRandMatrix".- Arith
signature(e1 = "numeric", e2 = "EuclRandVariable"): Given a numeric vectore1, a Euclidean random variablee2and an arithmetic operatorop, the Euclidean random variablee1 op e2is returned.- Arith
signature(e1 = "EuclRandVariable", e2 = "numeric"): Given a numeric vectore2, a Euclidean random variablee1and an arithmetic operatorop, the Euclidean random variablee1 op e2is returned.- Arith
signature(e1 = "EuclRandVariable", e2 = "EuclRandVariable"): Given two Euclidean random variablese1,e2and an arithmetic operatorop, the Euclidean random variablee1 op e2is 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 offununder univariate distributions.- E
signature(object = "AbscontDistribution", fun = "EuclRandVariable", cond = "missing"): expectation offununder absolutely continuous univariate distributions.- E
signature(object = "DiscreteDistribution", fun = "EuclRandVariable", cond = "missing"): expectation offununder discrete univariate distributions.- E
signature(object = "MultivariateDistribution", fun = "EuclRandVariable", cond = "missing"): expectation offununder multivariate distributions.- E
signature(object = "DiscreteMVDistribution", fun = "EuclRandVariable", cond = "missing"): expectation offununder discrete multivariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric"): conditional expectation offununder conditional univariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric"): conditional expectation offununder absolutely continuous conditional univariate distributions.- E
signature(object = "UnivariateCondDistribution", fun = "EuclRandVariable", cond = "numeric"): conditional expectation offununder 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)