Learn R Programming

sensR (version 1.2.2)

confint.twoAC: Confidence intervals and profile likelihoods for parameters in 2AC models

Description

Computes confidence intervals from the profiled likelihood and the Wald approximation in the 2AC model, or plots the profile likelihood function for d.prime.

Usage

## S3 method for class 'twoAC':
confint(object, parm, level = 0.95, 
        type = c("profile", "Wald"), ...)

## S3 method for class 'profile.twoAC':
confint(object, parm = "d.prime", level = 0.95, \dots)

## S3 method for class 'twoAC':
profile(fitted, alpha = 1e-3, nSteps = 1e2, range, \dots)

## S3 method for class 'profile.twoAC':
plot(x, level = c(0.95, 0.99), Log = FALSE,
      relative = TRUE, fig = TRUE, n = 1e3, ..., ylim = NULL)

Arguments

object
a fitted twoAC object or a profile.twoAC object.
fitted
a fitted twoAC object.
x
a profile.twoAC object.
type
the type of confidence interval required. "profile" is the most accurate.
parm
For confint.profile.twoAC: has to be "d.prime". For confint.twoAC: for type = "Wald" a specification of which parameters the confidence interval is required for. Ignored for t
level
the confidence level required.
alpha
determines the range of profiling. By default the likelihood is profiled in the 99.9% Wald confidence interval region.
range
if supplied, d.prime will be profiled between min(range) and max(range). This over-rules the automatic range computation.
nSteps
the number of profile steps.
Log
should the profile likelihood be plotted on the log-scale?
relative
should the relative or the absolute likelihood be plotted?
fig
should the profile likelihood be plotted?
n
the no. points used in the spline interpolation of the profile likelihood.
ylim
overrules default y-limits on the plot of the profile likelihood.
...
not currently used.

Value

  • confint: A matrix (or vector) with columns giving lower and upper confidence limits for each parameter. These will be labelled as (1-level)/2 and 1 - (1-level)/2 in % (by default 2.5% and 97.5%). Profile likelihood confindence intervals are only available for d.prime and not tau. profile.twoAC: a data.frame with the profile of d.prime. plot.profile.twoAC invisibly returns the spline approcimation to the profile.

Details

These confint methods call the appropriate profile method, then finds the confidence intervals by interpolation of the profile traces. If the profile object is already available, this should be used as the main argument rather than the fitted model object itself. In plot.profile.twoAC: at least one of Log and relative arguments have to be TRUE.

See Also

profile and confint

Examples

Run this code
(fm1 <- twoAC(c(2, 2, 6)))
confint(fm1)
confint(fm1, type = "Wald")

pr1 <- profile(fm1)
confint(pr1)

pr1 <- profile(fm1, alpha = 1e-5)
par(mfrow = c(2,2))
plot(pr1)
plot(pr1, Log = FALSE, relative = TRUE)
plot(pr1, Log = TRUE, relative = TRUE)
plot(pr1, Log = TRUE, relative = FALSE)

Run the code above in your browser using DataLab