profile.discrim {sensR} | R Documentation |
Profile likelihood and confidence interval methods for discrim objects
Description
Computes the (normalized or relative) profile likelihood for the parameters of a discrimination test, plots the normalized profile likelihood.
Usage
## S3 method for class 'discrim'
profile(fitted, ...)
## S3 method for class 'profile.discrim'
plot(x, level = c(0.99, 0.95), fig = TRUE,
method = "natural", n = 1e3, ...)
## S3 method for class 'discrim'
confint(object, parm, level = 0.95, ...)
Arguments
fitted |
a |
x |
a |
object |
a |
parm |
currently not used |
method |
the type of spline to be used in approximating the
profile likelhood curve (trace)—se |
n |
the number of spline interpolations to use in plotting the profile likelihood curve (trace) |
level |
for |
fig |
logical: should the normalized profile likelihoods be plotted? |
... |
For |
Details
confint
returns the confidence interval computed in
discrim
possibly at another level. The statistic used to
compute the confidence interval is therefore determined in the
discrim
call and may not be the likelihood root.
The likelihood profile is extracted from the discrim
object fitted with statistic = "likelihood"
.
Value
For profile
:
An object of class "profile.discrim", "data.frame"
—a
data.frame
with two columns giving
the value of the parameter and the corresponding value of the profile
likelihood.
For plot
:
The profile object is returned invisibly.
For confint
:
A 3x2 matrix with columns named "lower", "upper"
giving the
lower and upper (100 * level
)% confidence interval for the
parameters named in the rows.
Author(s)
Rune Haubo B Christensen and Per Bruun Brockhoff
References
Brockhoff, P.B. and Christensen R.H.B. (2010). Thurstonian models for sensory discrimination tests as generalized linear models. Food Quality and Preference, 21, pp. 330-338.
See Also
Examples
## 7 success out of 10 samples in a duo-trio experiment:
(dd <- discrim(7, 10, method = "duotrio", statistic = "likelihood"))
confint(dd)
plot(profile(dd))
points(confint(dd)[3,], rep(.1465, 2), pch = 3, cex = 2, lwd=2)