EVOLUTION-MANAGER
Edit File: printCoefmat.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Print Coefficient Matrices</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for printCoefmat {stats}"><tr><td>printCoefmat {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Print Coefficient Matrices</h2> <h3>Description</h3> <p>Utility function to be used in higher-level <code><a href="../../base/html/print.html">print</a></code> methods, such as those for <code><a href="summary.lm.html">summary.lm</a></code>, <code><a href="summary.glm.html">summary.glm</a></code> and <code><a href="anova.html">anova</a></code>. The goal is to provide a flexible interface with smart defaults such that often, only <code>x</code> needs to be specified. </p> <h3>Usage</h3> <pre> printCoefmat(x, digits = max(3, getOption("digits") - 2), signif.stars = getOption("show.signif.stars"), signif.legend = signif.stars, dig.tst = max(1, min(5, digits - 1)), cs.ind = 1L:k, tst.ind = k + 1L, zap.ind = integer(), P.values = NULL, has.Pvalue = nc >= 4L && length(cn <- colnames(x)) && substr(cn[nc], 1L, 3L) %in% c("Pr(", "p-v"), eps.Pvalue = .Machine$double.eps, na.print = "NA", quote = FALSE, right = TRUE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>a numeric matrix like object, to be printed.</p> </td></tr> <tr valign="top"><td><code>digits</code></td> <td> <p>minimum number of significant digits to be used for most numbers.</p> </td></tr> <tr valign="top"><td><code>signif.stars</code></td> <td> <p>logical; if <code>TRUE</code>, P-values are additionally encoded visually as ‘significance stars’ in order to help scanning of long coefficient tables. It defaults to the <code>show.signif.stars</code> slot of <code><a href="../../base/html/options.html">options</a></code>.</p> </td></tr> <tr valign="top"><td><code>signif.legend</code></td> <td> <p>logical; if <code>TRUE</code>, a legend for the ‘significance stars’ is printed provided <code>signif.stars = TRUE</code>.</p> </td></tr> <tr valign="top"><td><code>dig.tst</code></td> <td> <p>minimum number of significant digits for the test statistics, see <code>tst.ind</code>.</p> </td></tr> <tr valign="top"><td><code>cs.ind</code></td> <td> <p>indices (integer) of column numbers which are (like) <b>c</b>oefficients and <b>s</b>tandard errors to be formatted together.</p> </td></tr> <tr valign="top"><td><code>tst.ind</code></td> <td> <p>indices (integer) of column numbers for test statistics.</p> </td></tr> <tr valign="top"><td><code>zap.ind</code></td> <td> <p>indices (integer) of column numbers which should be formatted by <code><a href="../../base/html/zapsmall.html">zapsmall</a></code>, i.e., by ‘zapping’ values close to 0.</p> </td></tr> <tr valign="top"><td><code>P.values</code></td> <td> <p>logical or <code>NULL</code>; if <code>TRUE</code>, the last column of <code>x</code> is formatted by <code><a href="../../base/html/format.pval.html">format.pval</a></code> as P values. If <code>P.values = NULL</code>, the default, it is set to <code>TRUE</code> only if <code><a href="../../base/html/options.html">options</a>("show.coef.Pvalue")</code> is <code>TRUE</code> <em>and</em> <code>x</code> has at least 4 columns <em>and</em> the last column name of <code>x</code> starts with <code>"Pr("</code>.</p> </td></tr> <tr valign="top"><td><code>has.Pvalue</code></td> <td> <p>logical; if <code>TRUE</code>, the last column of <code>x</code> contains P values; in that case, it is printed if and only if <code>P.values</code> (above) is true.</p> </td></tr> <tr valign="top"><td><code>eps.Pvalue</code></td> <td> <p>number, ..</p> </td></tr> <tr valign="top"><td><code>na.print</code></td> <td> <p>a character string to code <code><a href="../../base/html/NA.html">NA</a></code> values in printed output.</p> </td></tr> <tr valign="top"><td><code>quote, right, ...</code></td> <td> <p>further arguments passed to <code><a href="../../base/html/print.default.html">print.default</a></code>.</p> </td></tr> </table> <h3>Value</h3> <p>Invisibly returns its argument, <code>x</code>. </p> <h3>Author(s)</h3> <p>Martin Maechler</p> <h3>See Also</h3> <p><code><a href="summary.lm.html">print.summary.lm</a></code>, <code><a href="../../base/html/format.pval.html">format.pval</a></code>, <code><a href="../../base/html/format.html">format</a></code>. </p> <h3>Examples</h3> <pre> cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12))) cmat <- cbind(cmat, cmat[, 1]/cmat[, 2]) cmat <- cbind(cmat, 2*pnorm(-cmat[, 3])) colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)") printCoefmat(cmat[, 1:3]) printCoefmat(cmat) op <- options(show.coef.Pvalues = FALSE) printCoefmat(cmat, digits = 2) printCoefmat(cmat, digits = 2, P.values = TRUE) options(op) # restore </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>