EVOLUTION-MANAGER
Edit File: ls.diag.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: Compute Diagnostics for 'lsfit' Regression Results</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 ls.diag {stats}"><tr><td>ls.diag {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compute Diagnostics for <code>lsfit</code> Regression Results</h2> <h3>Description</h3> <p>Computes basic statistics, including standard errors, t- and p-values for the regression coefficients. </p> <h3>Usage</h3> <pre> ls.diag(ls.out) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>ls.out</code></td> <td> <p>Typically the result of <code><a href="lsfit.html">lsfit</a>()</code></p> </td></tr> </table> <h3>Value</h3> <p>A <code>list</code> with the following numeric components. </p> <table summary="R valueblock"> <tr valign="top"><td><code>std.dev</code></td> <td> <p>The standard deviation of the errors, an estimate of <i>σ</i>.</p> </td></tr> <tr valign="top"><td><code>hat</code></td> <td> <p>diagonal entries <i>h_{ii}</i> of the hat matrix <i>H</i></p> </td></tr> <tr valign="top"><td><code>std.res</code></td> <td> <p>standardized residuals</p> </td></tr> <tr valign="top"><td><code>stud.res</code></td> <td> <p>studentized residuals</p> </td></tr> <tr valign="top"><td><code>cooks</code></td> <td> <p>Cook's distances</p> </td></tr> <tr valign="top"><td><code>dfits</code></td> <td> <p>DFITS statistics</p> </td></tr> <tr valign="top"><td><code>correlation</code></td> <td> <p>correlation matrix</p> </td></tr> <tr valign="top"><td><code>std.err</code></td> <td> <p>standard errors of the regression coefficients</p> </td></tr> <tr valign="top"><td><code>cov.scaled</code></td> <td> <p>Scaled covariance matrix of the coefficients</p> </td></tr> <tr valign="top"><td><code>cov.unscaled</code></td> <td> <p>Unscaled covariance matrix of the coefficients</p> </td></tr> </table> <h3>References</h3> <p>Belsley, D. A., Kuh, E. and Welsch, R. E. (1980) <em>Regression Diagnostics.</em> New York: Wiley. </p> <h3>See Also</h3> <p><code><a href="influence.measures.html">hat</a></code> for the hat matrix diagonals, <code><a href="ls.print.html">ls.print</a></code>, <code><a href="lm.influence.html">lm.influence</a></code>, <code><a href="summary.lm.html">summary.lm</a></code>, <code><a href="anova.html">anova</a></code>. </p> <h3>Examples</h3> <pre> ##-- Using the same data as the lm(.) example: lsD9 <- lsfit(x = as.numeric(gl(2, 10, 20)), y = weight) dlsD9 <- ls.diag(lsD9) utils::str(dlsD9, give.attr = FALSE) abs(1 - sum(dlsD9$hat) / 2) < 10*.Machine$double.eps # sum(h.ii) = p plot(dlsD9$hat, dlsD9$stud.res, xlim = c(0, 0.11)) abline(h = 0, lty = 2, col = "lightgray") </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>