The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.
D(f, x, order = 3)) for computing
asymptotic skewness of Gamma MLEs, with Monte Carlo validation.dualr to nabla. The
S4 class dualr retains its name (it describes the object
type — a dual number in R).D(f):
D(f) returns the derivative of f as a new
function.D(f, x) evaluates the derivative at
x.D(f, x, order = k) applies D k times for
k-th order derivative tensors.D(D(f)) composes naturally for higher-order
derivatives.D appends one
n-dimension. For f: R^n -> R: gradient (n),
Hessian (n,n), etc. For f: R^n -> R^m:
Jacobian (m,n), (m,n,n), etc.gradient(), hessian(), and
jacobian() as thin wrappers around D,
replacing separate seeding strategies with a single composable
mechanism. This simplifies the codebase at the cost of O(p)
gradient (was O(1) passes) and O(p^2) Hessian
(was O(p) passes).dual2_variable(), dual2_constant(),
value2(), first_deriv(),
second_deriv(), differentiate2(). Use
dual_variable_n(), dual_constant_n(),
deriv_n(), and differentiate_n() instead..make_grad_vector() and
.make_grad2_vector().D operator.score() -> gradient() — computes the
gradient of any scalar-valued function (still single-pass via
vector-valued derivatives).hessian() — unchanged (already mathematically
general).observed_information() — removed (trivial: just
-hessian()).score_and_hessian() -> jacobian() —
generalized to compute the full m x p Jacobian matrix of any
f: R^p -> R^m. Accepts functions returning lists,
numeric vectors, or scalar dualr objects.R/mle-helpers.R to
R/derivatives.R.dual_variable_n(),
dual_constant_n(), deriv_n(),
differentiate_n().dual2_variable(), dual2_constant(),
value2(), first_deriv(),
second_deriv(), differentiate2()) as thin
wrappers around the new generalized API.score() now computes the full gradient in 1 forward
pass (was p passes) using vector-valued derivatives, exploiting the
ANY slots of the dualr class.hessian() now computes the full Hessian in p forward
passes (was p(p+1)/2) using vector-gradient inner duals with nested
outer duals..is_scalar_dual() now also checks
length() == 1L to correctly distinguish scalar duals (C++
fast path) from vector-gradient duals (R path).+, -, *, /,
^), math (exp, sqrt,
log), and sum. Provides 3-10x speedup on
scalar dual operations while preserving full R fallback for nested
(second-order) duals..is_scalar_dual() predicate gates C++ vs R
paths using is.double() on slot contents.Rcpp to Imports and
LinkingTo; package now requires C++ compilation.dual to dualr to
avoid conflict with base R’s dual usage.setMethod dispatches for hot-path
arithmetic (+, -, *,
/, ^) and math (exp,
sqrt) operations, bypassing group generic overhead..dual_min() / .dual_max()
internal helpers, deduplicating 6 inline lambdas across
dual-arithmetic.R and dual-math.R.switch branches (sqrt,
exp, log) from Math group generic
that were shadowed by dedicated methods.sum() in Summary group
generic to use .as_dual() promotion, consistent with
prod, min, max, and
range.\code{compositional.mle} reference in
score() documentation.dual2_variable, differentiate2).score, hessian,
observed_information, score_and_hessian.erf, erfc,
beta, lbeta, psigamma.These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.