new_qfrm {qfratio} | R Documentation |
Construct qfrm object
Description
These are internal “constructor” functions used to make qfrm
and qfpm
objects, which are used as a return value from the
qfrm
, qfmrm
, and qfpm
functions.
Usage
new_qfrm(
statistic,
error_bound = NULL,
terms = statistic,
seq_error = NULL,
exact = FALSE,
twosided = FALSE,
alphaout = FALSE,
singular_arg = FALSE,
diminished = FALSE,
...,
class = character()
)
new_qfpm(statistic, exact = TRUE, ..., class = character())
Arguments
statistic |
Terminal value (partial sum) for the moment. When missing,
obtained as |
error_bound |
Terminal error bound. When missing,
obtained as |
terms |
Terms in series expression for the moment along varying polynomial degrees |
seq_error |
Vector of error bounds corresponding to |
exact , twosided , alphaout , singular_arg |
Logicals used to append attributes to the resultant error bound (see “Value”) |
diminished |
Logical used to append attribute to the resultant statistic and terms (see “Value”) |
... |
Additional arguments for accommodating subclasses |
class |
Character vector to (pre-)append classes to the return value |
Value
new_qfrm()
and new_qfpm()
return a list of class qfrm
and c(qfpm, qfrm)
, respectively. These classes are defined for
the print
and plot
methods.
The return object is a list of 4 elements which are intended to be:
$statistic
evaluation result (
sum(terms)
)$terms
vector of
0
th tom
th order terms$error_bound
error bound of
statistic
$seq_error
vector of error bounds corresponding to partial sums (
cumsum(terms)
)
When the result is exact, $terms
can be of length 1 and equal to
$statistic
. This is always the case for the qfpm
class.
When the relevant flags are provided in the constructor, $error_bound
and $seq_error
have the following attributes which control behaviors
of the print
and plot
methods:
"exact"
indicates whether the moment is exact
"twosided"
indicates whether the error bounds are two-sided
"alphaout"
indicates whether any of the scaling factors (
alphaA
,alphaB
,alphaD
) is outside(0, 1]
, when error bound does not strictly hold"singular"
indicates whether the relevant argument matrix is (numerically) singular, in which case the error bound is invalid
Similarly, when diminished = TRUE
, $statistic
and $terms
have the attribute "diminished"
being TRUE
, which indicates
that numerical underflow/diminishing happened during scaling
(see “Scaling” in d1_i
).
See Also
qfrm
, qfmrm
, qfpm
: functions
that return objects of these classes
methods.qfrm
: the print
and plot
methods