Calculate the log-likelihood surface for a part of parameter space
Source:R/loglik.surface.accel.R
loglik.surface.accel.Rd
Function to calculate the log-likelihood surface for a part of parameter space for an Unbiased Random Walk with an accelerated rate of evolution.
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
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.
Note
How fine-scaled the estimated log-likelihood surface is depends on the step size between the values in the input-vectors. The step-size therefore determines how accurate the representation of the support surface is, including the returned upper and lower estimates printed in the console. The range of the input vectors needs to be increased if the confidence interval includes the boundary of the input vector. Note also that it might be wise to include the maximum likelihood estimates as part of the input vectors. The computed support surface is conditional on the best estimates of the other model parameters that are not part of the support surface (e.g. the estimated ancestral trait value).
Examples
## 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))
#> lower upper
#> vstep 1.100 4.00
#> r 0.185 0.23
# }