Learn R Programming

evoTS (version 1.0.3)

loglik.surface.stasis: 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 the Stasis model.

Usage

loglik.surface.stasis(y, theta.vec, omega.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.

theta.vec

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

omega.vec

vector containing the parameter values of the omega 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 <- paleoTS::sim.Stasis(30)

## Fit the the model to the data.
x1<-paleoTS::opt.joint.Stasis(x)

# \donttest{
## Create log-likelihood surface (the example may take > 5 seconds to run)
loglik.surface.stasis(x, theta.vec= seq(-0.15,0.1,0.001), omega.vec = seq(0,0.1,0.001))
# }

Run the code above in your browser using DataLab