plotprofmle-methods | R Documentation |
Given a likelihood profile of a model (object of the class profile.mle
or profile.mle2
), the function plotprofmle
plots the relative log-likelihood profiles and the
plausibility intervals for each one of the (or selected ones) parameters of a model.
These same plausibility regions might be returned by likelregions
.
plotprofmle(object, nseg=20, ratio=log(8), which=NULL, ask=NULL,
col.line="blue", varname=NULL, ...)
likelregions(object, nseg=100, ratio=log(8), ...)
object |
list of profile data; object of class |
nseg |
positive integer; number of segments used by |
ratio |
real positive; log-likelihood ratio that defines the likelihood
interval to be shown in the plot by |
which |
vector of positive integers; if a subset of profiles is required,
the indexes of the mle's in |
ask |
logical; if |
col.line |
name; line color for the plausibility interval. |
varname |
vector of names; labels for the x-axis. If NULL defaults the names of
mle's in |
... |
further arguments to be passed to |
Log-likelihood profile plots are the basic diagnostic for model
fitting by maximum likelihood methods. The profiles show the minimum of the log-likelihood function
for a given value of a focal parameter, near the maximum likelihood
estimate (mle) of this parameter. Profile objects in R (classes profile.mle
and profile.mle2
)
return transformed values of the likelihood function, which are based
on the deviance (=minus twice log-likelihood). These
values are called 'z' and are the signed square-root of the deviance difference from the minimum deviance. As samples get
larger, z-profiles tends to be symmetrical V-shaped, and are used to calculate
confidence intervals using an approximation to the Chi-square
distribution (see details in Bolker (2008) and in the bbmle vignette
(vignette('mle2',package='bbmle')
).
In its original form (e.g. Edwards 1972), likelihood profiles do not use z-transformed values, and can be interpreted directly, even if they are asymmetric. At the scale of the log-likelihood function, all values of the parameters resulting in a negative log-likelihood less or equal to a given value k are exp(k) times as plausible as the mle. Hence, exp(k) is a likelihood ratio, and delimits a plausibility interval (or likelihood interval) for the mle's.
Function plotprofmle
plots profiles of the
negative log-likelihood functions, along with the limits of
likelihood interval for a given log-likelihood ratio
.
Function likelregions
returns the limits of the likelihood intervals for each parameter.
This might be seen as an analog function for confint
, and will return very similar values
for corresponding ratios if the profile is symmetric and monotonic. However, if the profile is
ill-behaved, likelregions
might return more than one interval for each parameter, whereas
confint
will return NA
with a warning.
signature(object="profile.mle2")
:The preferred invocation for these methods.
signature(object="mle2")
:A convenience wrapper
that calls profile
on the mle2 object and runs the former
method.
signature(object="profile.mle2")
:The preferred invocation for these methods.
signature(object="mle2")
:A convenience wrapper that calls profile
on the mle2 object and runs the former method.
João L.F. Batista, Andre Chalom, Paulo I. Prado prado@ib.usp.br
Bolker, B. 2008. Ecological Models and Data in R. Princeton: Princeton University Press.
Edwards, A.W.F. 1972. Likelihood – An Account of the Statistical Concept of Likelihood and its Application to Scientific Inference. New York: Cambridge University Press.
Royall, R.M. 2000. Statistical Evidence: A Likelihood Paradigm. London: Chapman and Hall.
profile.mle.class
, mle
, mle-class
from
stats; profile.mle2.class
, mle2
, mle2-class
from bbmle package.
birds.pln <- fitsad(birds, "lnorm")
birds.pln.p <- profile(birds.pln)
par(mfrow=c(1,2))
plotprofmle(birds.pln.p)
par(mfrow=c(1,1))
likelregions(birds.pln.p)
# Compare with the confidence intervals
confint(birds.pln.p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.