ellipse.glm | R Documentation |
This function produces the ellipsoidal outline of an approximate pairwise confidence region for a generalized linear model fit.
## S3 method for class 'glm' ellipse(x, which = c(1, 2), level = 0.95, t, npoints = 100, dispersion, ...)
x |
The first argument should be a |
which |
Which selects the pair of parameters to be plotted. The default is the first two. |
level |
The confidence level of the region. Default 95%. |
t |
The t statistic on the boundary of the ellipse. For Binomial or Poisson
families, |
npoints |
How many points to return in the ellipse. |
dispersion |
The value of dispersion to use. If specified, it is treated as fixed,
and the chi-square limits for |
... |
Other |
The summary function is used to obtain the approximate covariance matrix of the fitted parameters, the dispersion estimate, and the degrees of freedom.
A matrix with columns named according to which to outline the confidence region.
ellipse.default
## Dobson (1990) Page 93: Randomized Controlled Trial : counts <- c(18,17,15,20,10,20,25,13,12) outcome <- gl(3,1,9) treatment <- gl(3,3) glm.D93 <- glm(counts ~ outcome + treatment, family=poisson()) # Plot an approximate 95 % confidence region for the two Outcome parameters plot(ellipse(glm.D93, which = c(2,3)), type = 'l') points(glm.D93$coefficients[2], glm.D93$coefficients[3])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.