Last chance! 50% off unlimited learning
Sale ends in
Computes the (normalized or relative) profile likelihood for the parameters of a same-different test, plots the normalized profile likelihood and computes profile likelihood confidence intervals.
# S3 method for samediff
profile(fitted, which = 1:2, max = 2, numpts = 100,
max.delta = 10, max.tau = 10, ...)
# S3 method for profile.samediff
plot(x, which = 1:nc, level = c(0.99, 0.95),
fig = TRUE, ...)
# S3 method for samediff
confint(object, parm = c("tau", "delta"), level = 0.95, max = c(10, 10)
, ...)
a samediff
object
a profile.samediff
object
a samediff
object
numeric: which parameters to profile or plot; either "1" or "2" or "1:2" to mean "tau", "delta" or both respectively.
the parameter(s) to compute the confidence interval for
for profile
: control parameter to specify how many units beyond the MLE,
the profiling should proceed. For confint
: control parameter,
that can control the convergence for especially very large delta
control parameter: At how many points should the profile likelihood be evaluated?
control parameter: The maximum point at which to evaluate the profile likelihood for delta
same as max.delta
for "tau".
for plot
: At which levels to include horizontal lines to indicate
confidence levels in plots of the normalized profile
likelihoods. For confint
: at which level to compute the
confidence interval.
logical: Should the normalized profile likelihoods be plotted?
not currently used.
For profile
:
An object of class "profile.samediff", "data.frame"
---a
data.frame
with two columns for each parameter profiled giving
the value of the parameter and the corresponding value of the profile
likelihood.
For plot
:
An object of class "nProfile.samediff", "data.frame"
---the
data.frame
from the profile
-object with extra
columns corresponding to the which
parameter containing the
normalized profile liklelihood.
For confint
:
A 2x2 matrix with columns named "lower", "upper"
giving the
lower and upper (1 - alpha
)% confidence interval for the
parameters named in the rows.
# NOT RUN {
# data: 8 of the same samples were judged to be same
# 5 of the same samples were judged to be different
# 4 of the different samples were judged to be same
# 9 of the different samples were judged to be different
sadi <- samediff(8, 5, 4, 9)
confint(sadi)
plot(profile(sadi))
# }
Run the code above in your browser using DataLab