These functions are not normally called directly by the user.
Function uvector() is used by sdefit(). Function
uvector_noh() is a more limited version, maintained for documentation
purposes. Function logdet_and_v() is used by uvector() and
uvector_noh().
uvector(x, t, unit = NULL, beta0, beta1, eta, eta0, x0, t0, lambda,
mum = 1, mu0 = 1, mup = 1, sorted = FALSE, final = FALSE)uvector_noh(x, t, beta0, beta1, eta, eta0, x0, t0, lambda, final = FALSE)
logdet.and.v(cdiag, csub = NULL, z)
uvector() and uvector_noh(): If final = FALSE
(default), return a vector whose sum of squares should be minimized over the
parameters to obtain maximum-likelihood estimates. If final = TRUE,
passing the ML parameter estimates returns a list with the sigma estimates,
the maximized log-likelihood, and AIC and BIC criteria..
logdet_and_v(): List with elements logdet and v.
Data vectors
Unit id vector, if any.
SDE parameters or re-parameterizations.
Named list of parameters(s) for phi(), possibly local
vectors.
Optional \(\sigma\) multipliers.
Data already ordered by increasing t?
Mode, see below.
Vector with the diagonal elements \(c_{ii}\) of \(C\).
Vector with sub-diagonal \(c_{i, i-1}\) for \(i > 1\).
A numeric vector
uvector(): Estimation vector, general
uvector_noh(): Estimation vector, non-hierarchical
logdet.and.v(): Logarithm of determinant, and \(v\) vector
uvector() and uvector_noh() calculate a vector of
residuals for sum of squares minimization by nls() or nlme().
The first one works both for single-unit and for bilevel hierarchical models.
It is backward-compatible with uvector_noh(), which is only for
single-unit models but simpler and easier to understand. They require a
transformation function phi(x, theta), and a function
phiprime(x, theta) for the derivative dy/dx, where theta is a
list containing the transformation parameters.
logdet_and_v() calculates \(\log[\det(L)]\) and \(v
= L^{-1} z\), where \(C = LL'\), with \(L\) lower-triangular.
The three functions are essentially unchanged from García (2019)
<tools:::Rd_expr_doi("10.1007/s00180-018-0837-4")>, except for a somewhat safer computation
for very small beta1, and adding in logdet_and_v() a shortcut
for when \(L\) is diagonal (e.g., when \(\sigma_m = 0\)). The
transformation functions phi and phiprime can be passed as
globals, as in the original, or in an environment named trfuns.