Description Usage Arguments Details Value Warning Plotting profile likelihood for a difference between two parameters See Also
Find the profile likelihood for a specific parameter, or a difference between two parameters.
1 2 3 | plotProfLik(which, model, range, constraintsVect = NULL,
resolution = 20, iterations = 150, inflation = 1, conf = 0.95,
retainInt = NULL)
|
which |
numeric giving the parameter for which the profile likelihood is to be plotted. The appropriate number
can be identified from the fitted model, by entering |
model |
object of class |
range |
numeric vector of length two, providing a range of parameter values within which the profile likelihood is to be plotted. |
constraintsVect |
optional numerical vector. This only needs to be used if the confidence interval for the difference between two parameters is required (see specific section below). |
resolution |
numeric giving the number of points to be plotted. The user is advised to start at a low resolution to obtain the approproate range, then increase resolution to identify ranges for endpoints. |
iterations |
optional numerical giving the maximum number of iterations to be used by the optimization alogorithms. |
inflation |
numerical to be used if the confidence intervals are to be inflated by a specified amount, as suggested
by Burnham & Anderson (2000) to allow for model selection uncertainty. This simply increases the height of the dotted
line above the model maximum likelihood by a factor of |
conf |
numerical giving the level of confidence required, defaulting to the traditional 0.95. |
retainInt |
logical, can be used to force the model to retain int_ilvs in an asocial model. This is used internally by other functions when there is an offset on the s parameters, but can be safely ignored by the user. |
The profile likelihood method for finding (100-X)% confidence intervals works by finding the set of values for a
parameter that would not be rejected in a likelihood ratio test at the X% level of significance. This is equivalent to
finding the set of values for which the profile likelihood (-log likelihood optimized over all other parameters in the
model) is within C units of the -log-likelihood for the model, where C is the critical value for rejection at the X%
level of significance (1.92 for 95% confidence intervals). The plotProfLik
function can be used to plot
the profile likelihood for a parameter and find the approximate location of the endpoints of the confidence interval
after which profLikCI
can be used to locate the exact endpoints. The plotProfLik
function plots the
profile likelihood for the specified parameter with a dotted line at the point of rejection (C) at the X% significance
level. The endpoints of the confidence interval are where the profile likelihood crosses the dotted line. If necessary
the user can reduce the range and re-plot to "zoom in" on each endpoint. Note if points are plotted in red then it means
the optimization algorithm did not converge when calculating the profile likelihood for that point.
A dataframe giving the plotted values, and an indicator of whether the optimization algorithms converged (0) or not (1) when finding the profile likelihood for that point.
This function does not work when trueTies are present in an OADA. Instead use
plotProfLikTrueTies
for the confidence intervals on a parameter, or plotProfLikDiffTrueTies
for the difference between two parameters.
This can be achieved using the
constraintsVect
argument. e.g. if we wish to find the confidence interval for parameter 1 - parameter 2, we
specify which=1
and constraintsVect=c(1,1,2,3,etc.)
. This constrains parameter 1 and 2 to be the same, but adds
an offset to parameter 1 using the constrainedNBDAdata
function. The resulting profile likelihood is for
parameter 1 - parameter 2. This can only be done for parameters of the same type i.e. differences must be within the s
parameters, asoc_ilv, int_ilv or multi_ilv categories. If the user wishes to find confidence intervals for the difference
between two s parameters which is thought to span zero, we advise doing this as a two step process. e.g. find the upper limit
for s1-s2, setting range >0, then find the upper limit for s2-s1 setting range >0. This prevents values of s1 or s2<0 being
condsidered in the optimization process, which may trigger errors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.