| 1 |
\name{getSummary} |
| 2 |
\alias{getSummary} |
| 3 |
\alias{getSummary_expcoef} |
| 4 |
\alias{getSummary.lm} |
| 5 |
\alias{getSummary.glm} |
| 6 |
\alias{getSummary.clm} |
| 7 |
\alias{getSummary.polr} |
| 8 |
\alias{getSummary.simex} |
| 9 |
\alias{getSummary_expcoef.default} |
| 10 |
\alias{getSummary.aftreg} |
| 11 |
\alias{getSummary.coxph} |
| 12 |
\alias{getSummary.phreg} |
| 13 |
\alias{getSummary.survreg} |
| 14 |
\alias{getSummary.weibreg} |
| 15 |
\alias{getSummary.merMod} |
| 16 |
\alias{getSummary.ivreg} |
| 17 |
\alias{getSummary.tobit} |
| 18 |
\alias{getSummary.hurdle} |
| 19 |
\alias{getSummary.zeroinfl} |
| 20 |
\alias{getSummary.betareg} |
| 21 |
\alias{getSummary.multinom} |
| 22 |
|
| 23 |
|
| 24 |
\title{Get Model Summaries for Use with "mtable"} |
| 25 |
\description{A generic function and methods to collect coefficients |
| 26 |
and summary statistics from a model object. It is used in \code{\link{mtable}} |
| 27 |
} |
| 28 |
\usage{ |
| 29 |
|
| 30 |
\method{getSummary}{lm}(obj, alpha=.05,\dots) |
| 31 |
\method{getSummary}{glm}(obj, alpha=.05,\dots) |
| 32 |
\method{getSummary}{merMod}(obj, alpha=.05, \dots) |
| 33 |
|
| 34 |
# These are contributed by Christopher N. Lawrence |
| 35 |
\method{getSummary}{clm}(obj, alpha=.05,\dots) |
| 36 |
\method{getSummary}{polr}(obj, alpha=.05,\dots) |
| 37 |
\method{getSummary}{simex}(obj, alpha=.05,\dots) |
| 38 |
|
| 39 |
# These are contributed by Jason W. Morgan |
| 40 |
\method{getSummary}{aftreg}(obj, alpha=.05,\dots) |
| 41 |
\method{getSummary}{coxph}(obj, alpha=.05,\dots) |
| 42 |
\method{getSummary}{phreg}(obj, alpha=.05,\dots) |
| 43 |
\method{getSummary}{survreg}(obj, alpha=.05,\dots) |
| 44 |
\method{getSummary}{weibreg}(obj, alpha=.05,\dots) |
| 45 |
|
| 46 |
# These are contributed by Achim Zeileis |
| 47 |
\method{getSummary}{ivreg}(obj, alpha=.05,\dots) |
| 48 |
\method{getSummary}{tobit}(obj, alpha=.05,\dots) |
| 49 |
\method{getSummary}{hurdle}(obj, alpha=.05,\dots) |
| 50 |
\method{getSummary}{zeroinfl}(obj, alpha=.05,\dots) |
| 51 |
\method{getSummary}{betareg}(obj, alpha=.05,\dots) |
| 52 |
\method{getSummary}{multinom}(obj, alpha=.05,\dots) |
| 53 |
|
| 54 |
# A variant that reports exponentiated coefficients. |
| 55 |
# The default method calls 'getSummary()' internally and should |
| 56 |
# be applicable to all classes for which 'getSummary()' methods exist. |
| 57 |
getSummary_expcoef(obj, alpha=.05,\dots) |
| 58 |
\method{getSummary_expcoef}{default}(obj, alpha=.05,\dots) |
| 59 |
} |
| 60 |
\arguments{ |
| 61 |
\item{obj}{a model object, e.g. of class \code{lm} or \code{glm}} |
| 62 |
\item{alpha}{level of the confidence intervals; their coverage should |
| 63 |
be 1-alpha/2 } |
| 64 |
\item{\dots}{further arguments; ignored.} |
| 65 |
} |
| 66 |
\details{ |
| 67 |
The generic function \code{getSummary} is called by \code{\link{mtable}} |
| 68 |
in order to obtain the coefficients and summaries of model objects. |
| 69 |
In order to adapt \code{\link{mtable}} to models of classes other |
| 70 |
than \code{\link{lm}} or \code{\link{glm}} one needs to |
| 71 |
define \code{getSummary} methods for these classes and |
| 72 |
to set a summary template via \code{\link{setSummaryTemplate}} |
| 73 |
} |
| 74 |
\value{ |
| 75 |
Any method of \code{getSummary} must return a list with the following |
| 76 |
components: |
| 77 |
|
| 78 |
\item{coef}{an array with coefficient estimates; |
| 79 |
the lowest dimension \emph{must} have the following |
| 80 |
names and meanings: |
| 81 |
\tabular{rcl}{ |
| 82 |
\code{est} \tab \tab the coefficient estimates,\cr |
| 83 |
\code{se} \tab \tab the estimated standard errors,\cr |
| 84 |
\code{stat}\tab \tab t- or Wald-z statistics,\cr |
| 85 |
\code{p} \tab \tab significance levels of the statistics,\cr |
| 86 |
\code{lwr} \tab \tab lower confidence limits, \cr |
| 87 |
\code{upr} \tab \tab upper confidence limits. \cr |
| 88 |
} |
| 89 |
The higher dimensions of the array correspond to |
| 90 |
the individual coefficients and, in multi-equation models, |
| 91 |
to the model equations. |
| 92 |
|
| 93 |
} |
| 94 |
\item{sumstat}{a vector containing the model summary statistics; |
| 95 |
the components may have arbitrary names.} |
| 96 |
} |
| 97 |
|
| 98 |
|
| 99 |
\keyword{misc} |
| 100 |
\keyword{utilities} |