Skip to contents

Function to find maximum likelihood solutions to a Unbiased Random Walk with an decelerating or decelerating rate of change through time.

Usage

opt.joint.decel(y, pool = TRUE, meth = "L-BFGS-B", hess = FALSE)

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.

References

Voje, K. L. 2020. Testing eco‐evolutionary predictions using fossil data: Phyletic evolution following ecological opportunity.Evolution 74:188–200.

Author

Kjetil Lysne Voje

Examples

## Generate a paleoTS object by simulating a univariate evolutionary sequence
x <- paleoTS::sim.GRW(30)

## Fit the model
opt.joint.decel(x)
#> $logL
#> [1] -12.87488
#> 
#> $AICc
#> [1] 32.67285
#> 
#> $parameters
#>         anc       vstep           r 
#> -0.13591521  0.09267048 -0.02324751 
#> 
#> $modelName
#> [1] "Decel"
#> 
#> $method
#> [1] "Joint"
#> 
#> $se
#> NULL
#> 
#> $K
#> [1] 3
#> 
#> $n
#> [1] 30
#> 
#> attr(,"class")
#> [1] "paleoTSfit"