Fit an Unbiased Random Walk with an accelerating rate of change through time.
Source:R/opt.joint.accel.R
opt.joint.accel.Rd
Function to find maximum likelihood solutions to a Unbiased Random Walk with an accelerating or decelerating rate of change through time.
Arguments
- y
an univariate evoTS object.
- pool
logical indicating whether to pool variances across samples
- meth
optimization method, passed to function optim. Default is "L-BFGS-B".
- hess
logical, indicating whether to calculate standard errors from the Hessian matrix.
Value
- logL
the log-likelihood of the optimal solution
- AICc
AIC with a correction for small sample sizes
- parameters
parameter estimates
- modelName
abbreviated model name
- method
Joint consideration of all samples
- K
number of parameters in the model
- n
the number of observations/samples
Note
The models have been implemented to be compatible with the joint parameterization routine in the package paleoTS. The optimization is therefore fit using the actual sample values, with the autocorrelation among samples accounted for in the log-likelihood function. The joint distribution of sample means is multivariate normal, with means and variance-covariances determined by evolutionary parameters and sampling errors.
Examples
## Generate a paleoTS object by simulating a univariate evolutionary sequence
y <- paleoTS::sim.GRW(30)
## Fit the model
opt.joint.accel(y)
#>
#> paleoTSfit object [n = 30 , K = 3 ]
#>
#> Model: Accel
#> Method: Joint
#> log-likelihood = -91.70068
#> AICc = 190.3244
#>
#> Parameter estimates:
#> anc vstep r
#> 2.554096e-01 2.189707e-07 1.000000e+00
#>
#> Additional elements not printed: convergence logLFunction