## S3 method for class 'glm':
profile(fitted, which.par, alpha = 0.005, max.steps = 50,
nsteps = 8, step.warn = 5, trace = F, ...)
## S3 method for class 'profile.glm':
plot(x, which.par, likelihood = TRUE,
log = FALSE, relative = TRUE, approx = TRUE, conf.int = TRUE,
level = 0.95, n = 100, fig = TRUE, ylim = NULL, ...)
glm
with a binomial familyprofile.glm
likelihood = FALSE
likelihood = FALSE
conf.int =
FALSE
fig = FALSE
the list of points from the spline
interpolation is returnedn
max.steps
is reachedstep.warn
profile
: a list of class profile.glm with a range of
parameter values and lroot statistics for each parameter in
which.par
For plot
: if fig = FALSE
a list with
plotting points and confidence interval(s) for each parameter in
which.par
is returned. If fig = TRUE
the list is
returned invisibly.lroot
returned by profile
is the signed square-root
of the usual profile likelihood
$$sgn(\theta-\hat{\theta})\sqrt{2(l(\hat{\theta})-l(\theta))}$$
where $\theta$ is the
parameter being profiled and $\hat{\theta}$ is the maximum likelihood
estimate of $\theta$. The appertaining par.vals
is a vector
of $\theta$ values in an appropriate range around $\hat{\theta}$.
The logical argument likelihood
in plot
controls if the
profile likelihood or the likelihood root should be plotted.glm
,
profile.glm
,
plot.profile
data(serum)
serum.glm <- glm(cbind(y, n-y) ~ dose, family=binomial, data=serum)
pr <- profile(serum.glm)
plot(pr)
Run the code above in your browser using DataLab