These functions compute moments of standardised-t and standard normal
distibutions. These distributions have mean zero and variance 1.
Standardised-t is often prefferred over Student-t for innovation
distributions, since its variance doesn't depend on its parameter
(degrees of freedom). The absolute moments of the usual
t-distributions are provided, as well.
The names of the functions start with an abbreviated name of the
distribution concerned: stdnorm (N(0,1)), stdt
(standardised-t), t (Student-t).
The functions with names ending in absmoment()
(stdnormabsmoment(), stdtabsmoment() and tabsmoment())
compute absolute moments, The rest (stdnormmoment() and
stdtmoment()) compute ordinary moments.
The absolute moments are valid for (at least) k >= 0, not
necessarily integer. The ordinary moments are currently intended only
for integer moments and return NaN's for fractional ones, with
warnings.
Note that the Student-t and standardised-t with \(\nu\) degrees
of freedom have finite (absolute) moments only for \(k<\nu\).
As a consequence, standardised-t is defined only for \(\nu>2\)
(otherwise the variance is infinite).
stdtabsmoment returns Inf for any \(k \ge \nu\).
stdtmoment returns Inf for even integer k's, such
that \(k \ge \nu\). However, for odd integers it returns
zero and for non-integer moments it returns NaN.
Here is an example, where the first two k's are smaller than
nu, while the others are not:
stdtabsmoment(nu = 5, k = c(4, 4.5, 5, 5.5));stdtmoment(nu = 5, k = c(4, 4.5, 5, 5.5))
These functions are designed to work with scalar nu but this
is not enforced.