EVOLUTION-MANAGER
Edit File: dummy.coef.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: Extract Coefficients in Original Coding</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 dummy.coef {stats}"><tr><td>dummy.coef {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Extract Coefficients in Original Coding</h2> <h3>Description</h3> <p>This extracts coefficients in terms of the original levels of the coefficients rather than the coded variables. </p> <h3>Usage</h3> <pre> dummy.coef(object, ...) ## S3 method for class 'lm' dummy.coef(object, use.na = FALSE, ...) ## S3 method for class 'aovlist' dummy.coef(object, use.na = FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>a linear model fit.</p> </td></tr> <tr valign="top"><td><code>use.na</code></td> <td> <p>logical flag for coefficients in a singular model. If <code>use.na</code> is true, undetermined coefficients will be missing; if false they will get one possible value.</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>A fitted linear model has coefficients for the contrasts of the factor terms, usually one less in number than the number of levels. This function re-expresses the coefficients in the original coding; as the coefficients will have been fitted in the reduced basis, any implied constraints (e.g., zero sum for <code>contr.helmert</code> or <code>contr.sum</code>) will be respected. There will be little point in using <code>dummy.coef</code> for <code>contr.treatment</code> contrasts, as the missing coefficients are by definition zero. </p> <p>The method used has some limitations, and will give incomplete results for terms such as <code>poly(x, 2)</code>. However, it is adequate for its main purpose, <code>aov</code> models. </p> <h3>Value</h3> <p>A list giving for each term the values of the coefficients. For a multistratum <code>aov</code> model, such a list for each stratum. </p> <h3>Warning</h3> <p>This function is intended for human inspection of the output: it should not be used for calculations. Use coded variables for all calculations. </p> <p>The results differ from S for singular values, where S can be incorrect. </p> <h3>See Also</h3> <p><code><a href="aov.html">aov</a></code>, <code><a href="model.tables.html">model.tables</a></code></p> <h3>Examples</h3> <pre> options(contrasts = c("contr.helmert", "contr.poly")) ## From Venables and Ripley (2002) p.165. npk.aov <- aov(yield ~ block + N*P*K, npk) dummy.coef(npk.aov) npk.aovE <- aov(yield ~ N*P*K + Error(block), npk) dummy.coef(npk.aovE) </pre> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>