profile.cauphyfit {cauphy}R Documentation

Method for Profiling cauphyfit Objects

Description

Investigates the profile log-likelihood function for a fitted model of class cauphyfit.

Usage

## S3 method for class 'cauphyfit'
profile(fitted, which = 1:npar, level = 0.8, npoints = 100, ...)

Arguments

fitted

the cauphyfit fitted model object.

which

the original model parameters which should be profiled. This can be a numeric or character vector. By default, all parameters are profiled.

level

highest confidence level for parameters intervals, computed using the approximated Hessian (see compute_vcov).

npoints

number of points to profile the likelihood for each parameter.

...

further arguments passed to or from other methods.

Details

This function computes a confidence interval for the parameters using confint.cauphyfit, and then computes the likelihood function on a grid with npoints values evenly spaced between the bounds of the interval, for each parameter one by one, all other parameters being fixed.

Value

An object of class profile.cauphyfit, which is a list with an element for each parameter being profiled. The elements are data-frames with two variables:

par.vals:

a matrix of parameter values for each fitted model.

profLogLik:

the profile log likelihood.

See Also

fitCauchy, plot.profile.cauphyfit, profile.

Examples

phy <- ape::rphylo(5, 0.1, 0)
dat <- rTraitCauchy(n = 1, phy = phy, model = "cauchy", parameters = list(root.value = 0, disp = 1))
fit <- fitCauchy(phy, dat, model = "cauchy", method = "reml")
pr <- profile(fit)
plot(pr)


[Package cauphy version 1.0.2 Index]