printtex {gets} | R Documentation |
Generate LaTeX code of an estimation result
Description
Convenience functions that generates LaTeX-code of an estimation result in equation-form. printtex
can, in principle, be applied to any object for which coef
, vcov
and logLik
methods exist. Note: The generated LaTeX-code contains an eqnarray
environment, which requires that the amsmath
package is loaded in the preamble of the LaTeX document.
Usage
printtex(x, fitted.name=NULL, xreg.names=NULL, digits=4,
intercept=TRUE, gof=TRUE, diagnostics=TRUE, nonumber=FALSE,
nobs="T", index="t", dec=NULL, print.info=TRUE)
## S3 method for class 'arx'
toLatex(object, ...)
## S3 method for class 'gets'
toLatex(object, ...)
Arguments
x |
an estimation result, e.g. |
object |
an estimation result of class |
fitted.name |
|
xreg.names |
|
digits |
integer, the number of digits to be printed |
intercept |
logical or numeric. The argument determines whether one of the regressors is an intercept or not, or its location. If |
gof |
logical, whether to include goodness-of-fit in the print |
diagnostics |
logical, whether to include diagnostics in the print |
nonumber |
logical, whether to remove or not (default) the equation-numbering |
nobs |
character, the notation to use to denote the number of observations |
index |
|
dec |
|
print.info |
|
... |
arguments passed on to |
Details
toLatex.arx
and toLatex.gets
are simply wrappers to printtex
Value
LaTeX code of an estimation result
Author(s)
Genaro Sucarrat, http://www.sucarrat.net/
See Also
arx
, logitx
, getsm
, getsv
, isat
Examples
##simulate random variates, estimate model:
y <- rnorm(30)
mX <- matrix(rnorm(30*2), 30, 2)
mymod <- arx(y, ar=1:3, mxreg=mX)
##print latex code of estimation result:
printtex(mymod)
##add intercept, at the end, to regressor matrix:
mX <- cbind(mX,1)
colnames(mX) <- c("xreg1", "xreg2", "intercept")
mymod <- arx(y, mc=FALSE, mxreg=mX)
##set intercept location to 3:
printtex(mymod, intercept=3)