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. arx, gets or isat object

object

an estimation result of class arx or gets

fitted.name

NULL or a user-specified name of left-hand side variable

xreg.names

NULL or a user-specified character vector with the names of regressors

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 TRUE, then the intercept is assumed to be located at coef(x)[1], and hence the regressor-name of location 1 is excluded from the print. If FALSE, then it is assumed that there is no intercept among the regressors. If numeric, then it is assumed that the regressors contain an intercept at the location equal to the numeric value

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

NULL or a character, only relevant if fitted.name is not NULL, and if the object in question is of class arx, gets or isat

dec

NULL or a character (for example ","). In the latter case, an attempt is made to replace the dot separator . with the character in dec

print.info

logical, whether to print the info at the start or not

...

arguments passed on to printtex

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)


[Package gets version 0.38 Index]