Method for Profiling vglm Objects
profilevglm.RdInvestigates the profile log-likelihood function for a fitted model of
class "vglm".
Usage
profilevglm(object, which = 1:p.vlm, alpha = 0.01,
maxsteps = 10, del = zmax/5, trace = NULL, ...)Arguments
- object
the original fitted model object.
- which
the original model parameters which should be profiled. This can be a numeric or character vector. By default, all parameters are profiled.
- alpha
highest significance level allowed for the profiling.
- maxsteps
maximum number of points to be used for profiling each parameter.
- del
suggested change on the scale of the profile t-statistics. Default value chosen to allow profiling at about 10 parameter values.
- trace
logical: should the progress of profiling be reported? The default is to use the
tracevalue from the fitted object; seevglm.controlfor details.- ...
further arguments passed to or from other methods.
Value
A list of classes "profile.glm"
and "profile" with an element
for each parameter being profiled.
The elements are data-frames with two
variables
- par.vals
a matrix of parameter values for each fitted model.
- tau
the profile t-statistics.
Details
This function is called by
confintvglm to do the profiling.
See also profile.glm
for details.
Author
T. W. Yee adapted this function from
profile.glm,
written originally by D. M. Bates and W. N. Venables.
(For S in 1996.)
The help file was also used as a template.
Examples
pneumo <- transform(pneumo, let = log(exposure.time))
fit1 <- vglm(cbind(normal, mild, severe) ~ let, propodds,
trace = TRUE, data = pneumo)
#> Iteration 1: deviance = 5.10322
#> Iteration 2: deviance = 5.026838
#> Iteration 3: deviance = 5.026826
#> Iteration 4: deviance = 5.026826
pfit1 <- profile(fit1, trace = FALSE)
confint(fit1, method = "profile", trace = FALSE)
#> 2.5 % 97.5 %
#> (Intercept):1 -12.491514 -7.300884
#> (Intercept):2 -13.436780 -8.165407
#> let 1.907272 3.401708