Extract details from statistical models for table construction. The function has methods for a range of statistical models.
extract(model, ...)
A statistical model object.
Custom parameters, which are handed over to subroutines. The
arguments are usually passed to the summary
function, but in some
cases to other functions.
The extract
function serves to retrieve coefficients, standard
errors, p-values, confidence intervals, and goodness-of-fit statistics from
statistical models in R. More than 100 extract
methods
("extensions") for various statistical models are available. The function
returns a '>texreg object.
extract
is a generic function, which extracts coefficients and
GOF measures from statistical model objects. extract
methods
for the specific model types are called by the generic extract
function if it encounters a model known to be handled by the specific method.
The output is a '>texreg object, which is subsequently used by
the texreg
function and related functions.
To list the model classes for which extract methods exist, type
showMethods("extract")
or methods("extract")
. To show the
method definition (i.e., the function body) of a specific extract method, use
the getMethod
function, for example getMethod("extract", "lm")
for linear models. To get help on a specific extract method, type something
like ?`extract,lm-method`
(or something similar for other models,
where "lm"
needs to be replaced by the class name of the respective
model).
Users can contribute their own extensions for additional statistical models. Examples are contained in the article in the Journal of Statistical Software referenced below. Suggestions can be submitted as pull requests at https://github.com/leifeld/texreg/pulls or through the issue tracker at https://github.com/leifeld/texreg/issues.
Leifeld, Philip (2013). texreg: Conversion of Statistical Model Output in R to LaTeX and HTML Tables. Journal of Statistical Software 55(8): 1-24. http://www.jstatsoft.org/v55/i08/.