make_numeric_moment_function {aghq}R Documentation

Compute numeric moments

Description

Create a function suitable for computation of numeric moments. This function is used internally by compute_moment when the user chooses nn, and is unlikely to need to be called by a user directly.

Usage

make_numeric_moment_function(nn, j, quad = NULL, centre = 0, shift = NULL, ...)

get_shift(gg)

Arguments

nn

Order of moment to be computed, see nn argument of compute_moment.

j

Numeric, positive integer, index of parameter vector to compute the numeric moment for.

quad

Optional, object of class aghq, only used if shift is not NULL.

centre

Numeric scalar, added to shift to ensure that central moments remain far from zero.

shift

Numeric scalar, amount by which to shift theta. The function that this outputs is g(theta) = (theta)^nn + shift, and shift is returned with the object so that it may later be subtracted. Default of NULL chooses this value internally.

...

Not used.

gg

Object of class aghqmoment. Returns the shift applied to the moment function. Returns 0 if no shift applied.

Value

Object of class aghqmoment, see make_moment_function


[Package aghq version 0.4.1 Index]