Learn R Programming

evoTS (version 1.0.3)

loglik.surface.accel: Calculate the log-likelihood surface for a part of parameter space

Description

Function to calculate the log-likelihood surface for a part of parameter space for an Unbiased Random Walk with an accelerated rate of evolution.

Usage

loglik.surface.accel(y, vstep.vec, r.vec, pool = TRUE)

Value

the function returns the range of parameter values that are within two log-likelihood units from the best (maximum) parameter estimate and a log-likelihood surface.

Arguments

y

an univariate paleoTS object.

vstep.vec

vector containing the parameter values of the variance parameter to be evaluated

r.vec

vector containing the parameter values of the r parameter to be evaluated

pool

indicating whether to pool variances across samples

Author

Kjetil Lysne Voje

Examples

Run this code
## Generate a paleoTS objects
x <- sim.accel.decel(50)

## Fit the model to the data.
x1<-opt.joint.accel(x)

# \donttest{
## Create log-likelihood surface (the example may take > 5 seconds to run)
loglik.surface.accel(x, vstep.vec = seq(0,4,0.005), r.vec = seq(0.15,0.25,0.005))
# }

Run the code above in your browser using DataLab