profile.cauphyfit | R Documentation |
cauphyfit
ObjectsInvestigates the profile log-likelihood function for a fitted model of class cauphyfit
.
## S3 method for class 'cauphyfit'
profile(fitted, which = 1:npar, level = 0.8, npoints = 100, ...)
fitted |
the |
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 |
npoints |
number of points to profile the likelihood for each parameter. |
... |
further arguments passed to or from other methods. |
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.
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.
fitCauchy
, plot.profile.cauphyfit
, profile
.
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.