Description Usage Arguments Value
View source: R/transformMoment.R
Let X be a random variable and Y the corresponding centered variable, i.e. Y = X - μ.
Let p be the order
of the desired moment.
If type = 'raw', this function returns
E(X^p) = ∑ choose(p,k)*μ^(p-k)*E(Y^k),
where the sum is taken over any row k
in expand.grid(lapply(1:n, function(i) 0:p[i]))
.
The values of E(Y^k) are replaced by
centralMoment[[i]]
, if k
= centralMomentOrders[i, ]
transformMoment(type = 'central', ...)
, if k
is a row in rawMomentOrders
symbolicMoments(closure, k)
, if k
is neither a row in centralMomentOrders
nor in rawMomentOrders
If type = 'central', this function returns
E(Y^p) = ∑ (-1)^(p-k)*choose(p,k)*μ^(p-k)*E(X^k),
where the sum is taken over any row k
in expand.grid(lapply(1:n, function(i) 0:p[i]))
.
The values of E(X^k) are replaced by
rawMoment[[i]]
, if k
= rawMomentOrders[i, ]
transformMoment(type = 'raw', ...)
, if k
is not a row in rawMomentOrders
1 2 | transformMoment(order, type, momentList, closure = "zero",
simplify = TRUE)
|
order |
numeric vector giving the order of the desired moment. |
type |
string, either 'central' or 'raw'. |
momentList |
object of class |
closure |
string giving the closure method to use if a central moment is unknown.
Possible values are the same as for argument |
simplify |
bool indiciating if the resulting expressions should be simplified.
Function |
This function returns an object of class 'momentList'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.