EVOLUTION-MANAGER
Edit File: effects.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: Effects from Fitted Model</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 effects {stats}"><tr><td>effects {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Effects from Fitted Model</h2> <h3>Description</h3> <p>Returns (orthogonal) effects from a fitted model, usually a linear model. This is a generic function, but currently only has a methods for objects inheriting from classes <code>"lm"</code> and <code>"glm"</code>. </p> <h3>Usage</h3> <pre> effects(object, ...) ## S3 method for class 'lm' effects(object, set.sign = FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>an <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> object; typically, the result of a model fitting function such as <code><a href="lm.html">lm</a></code>.</p> </td></tr> <tr valign="top"><td><code>set.sign</code></td> <td> <p>logical. If <code>TRUE</code>, the sign of the effects corresponding to coefficients in the model will be set to agree with the signs of the corresponding coefficients, otherwise the sign is arbitrary.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>arguments passed to or from other methods.</p> </td></tr> </table> <h3>Details</h3> <p>For a linear model fitted by <code><a href="lm.html">lm</a></code> or <code><a href="aov.html">aov</a></code>, the effects are the uncorrelated single-degree-of-freedom values obtained by projecting the data onto the successive orthogonal subspaces generated by the QR decomposition during the fitting process. The first <i>r</i> (the rank of the model) are associated with coefficients and the remainder span the space of residuals (but are not associated with particular residuals). </p> <p>Empty models do not have effects. </p> <h3>Value</h3> <p>A (named) numeric vector of the same length as <code><a href="residuals.html">residuals</a></code>, or a matrix if there were multiple responses in the fitted model, in either case of class <code>"coef"</code>. </p> <p>The first <i>r</i> rows are labelled by the corresponding coefficients, and the remaining rows are unlabelled. Note that in rank-deficient models the corresponding coefficients will be in a different order if pivoting occurred. </p> <h3>References</h3> <p>Chambers, J. M. and Hastie, T. J. (1992) <em>Statistical Models in S.</em> Wadsworth & Brooks/Cole. </p> <h3>See Also</h3> <p><code><a href="coef.html">coef</a></code></p> <h3>Examples</h3> <pre> y <- c(1:3, 7, 5) x <- c(1:3, 6:7) ( ee <- effects(lm(y ~ x)) ) c( round(ee - effects(lm(y+10 ~ I(x-3.8))), 3) ) # just the first is different </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>