latex.Design {Design} | R Documentation |
LaTeX Representation of a Fitted Model
Description
Creates a file containing a LaTeX representation of the fitted model. For
model-specific typesetting there is latex.lrm
, latex.cph
,
latex.psm
and latex.ols
. latex.cph
has some
arguments that are specific to cph
models. These routines work
with the display
package from statlib to display and print the
formatted model fits. latexDesign
is the core function which is
called internally by latex.Design
(which is called by
latex.cph
, latex.ols
, etc.).
Usage
latex(object, title,
file=paste(first.word(deparse(substitute(object))),'tex',sep='.'), ...)
Arguments
object |
a fit object created by a fitting function in the Design series
|
title |
ignored |
file |
name of .tex file to create, default is first word of argument
object with ".tex" added. Set to "" to send LaTeX
output to standard output.
|
... |
further arguments, including
append - whether or not to append to an existing file
which - a vector of subcripts (corresponding to
object$Design$name )
specifying a submodel to print. Default is to describe the whole
model.
which can also be a vector of character strings specifying the
factor names to print. Enough of each string is needed to ensure
a unique match. Names for interaction effects are of the form
"age * sex" . For any interaction effect for which you do not
request main effects, the main effects will be added to which .
When which is given, the model structural statement is not
included. In this case, intercepts are not included either.
varnames - variable names to substitute for non-interactions. Order must correspond
to
object$Design$name and interactions must be omitted.
Default is
object$Design$name[object$Design$assume.code!=9] . varnames can contain any LaTeX commands such as subscripts and "\\\\frac"
(all "\" must be quadrupled.)
Any "/" must be preceeded by "\\" (2, not 4 backslashes).
Elements of varnames for interactions are ignored; they can be
set to any value.
columns - maximum number of columns of printing characters to allow before
outputting a LaTeX newline command
prefix - if given, a LaTeX <=fteqn command of the form
\lefteqn{prefix =} \\
will be inserted to print a left-hand-side of the equation.
inline - Set to
TRUE to create text for insertion in an in-line equation. This
text contains only the expansion of X beta, and is not surrounded by
"$" .
before - a character string to place before each line of output. Use the default
for a LaTeX
eqnarray environment.
intercept - a special intercept value to include that is not part of the standard
model parameters (e.g., centering constant in Cox model). Only allowed
in the
latex.Design rendition.
pretrans - if any spline or polynomial-expanded variables are themselves
transformed, a table of pre-transformations will be formed unless
pretrans=FALSE .
digits - number of digits of precision to use in formatting
coefficients and other numbers
Other arguments in '...' will be passed to latex.default .
|
Value
a file name of class "latex"
Author(s)
Frank Harrell
Department of Biostatistics, Vanderbilt University
f.harrell@vanderbilt.edu
See Also
latex
, rcspline.restate
,
Design
Examples
## Not run:
f <- lrm(death ~ rcs(age)+sex)
w <- latex(f)
w # displays, using e.g. xdvi
latex(f, file="") # send LaTeX code to screen
## End(Not run)
[Package
Design version 2.0-12
Index]