calculus {estimators} | R Documentation |
Distribution Calculus
Description
Distribution Calculus
Usage
## S4 method for signature 'Norm,Norm'
e1 + e2
## S4 method for signature 'numeric,Norm'
e1 + e2
## S4 method for signature 'Norm,numeric'
e1 + e2
## S4 method for signature 'Norm,Norm'
e1 - e2
## S4 method for signature 'numeric,Norm'
e1 - e2
## S4 method for signature 'Norm,numeric'
e1 - e2
## S4 method for signature 'numeric,Norm'
e1 * e2
## S4 method for signature 'Norm,numeric'
e1 * e2
## S4 method for signature 'Norm,numeric'
e1 / e2
## S4 method for signature 'Norm,logical'
sum(x, ..., na.rm = FALSE)
## S4 method for signature 'Norm'
exp(x)
Arguments
x , e1 , e2 |
objects of subclass |
... |
extra arguments. |
na.rm |
logical. Should missing values be removed? |
Value
All calculations return Distribution objects (specifically, objects
of a class that is a subclass of Distribution
), accordingly to the property
at hand.
Examples
# -----------------------------------------------------
# Distribution Calculus Example
# -----------------------------------------------------
library(estimators)
# Normal location - scale transformation
x <- Norm(mean = 2, sd = 3)
y <- 3 * x + 1 # Norm(mean = 7, sd = 9)
# Addition of two independent Normal random variables
x1 <- Norm(mean = 1, sd = 3)
x2 <- Norm(mean = 2, sd = 4)
x3 <- x1 + x2 # Norm(mean = 3, sd = 5)
[Package estimators version 0.8.5 Index]