View source: R/gets-base-source.R
| printtex | R Documentation | 
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.
  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, ...)
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   | 
toLatex.arx and toLatex.gets are simply wrappers to printtex 
LaTeX code of an estimation result
Genaro Sucarrat, http://www.sucarrat.net/
arx, logitx, getsm, getsv, isat
##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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.