EVOLUTION-MANAGER
Edit File: vcov.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: Calculate Variance-Covariance Matrix for a 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 vcov {stats}"><tr><td>vcov {stats}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Calculate Variance-Covariance Matrix for a Fitted Model Object</h2> <h3>Description</h3> <p>Returns the variance-covariance matrix of the main parameters of a fitted model object. The “main” parameters of model correspond to those returned by <code><a href="coef.html">coef</a></code>, and typically do not contain a nuisance scale parameter (<code><a href="sigma.html">sigma</a></code>). </p> <h3>Usage</h3> <pre> vcov(object, ...) ## S3 method for class 'lm' vcov(object, complete = TRUE, ...) ## and also for '[summary.]glm' and 'mlm' ## S3 method for class 'aov' vcov(object, complete = FALSE, ...) .vcov.aliased(aliased, vc, complete = TRUE) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>object</code></td> <td> <p>a fitted model object, typically. Sometimes also a <code><a href="../../base/html/summary.html">summary</a>()</code> object of such a fitted model. </p> </td></tr> <tr valign="top"><td><code>complete</code></td> <td> <p>for the <code>aov</code>, <code>lm</code>, <code>glm</code>, <code>mlm</code>, and where applicable <code>summary.lm</code> etc methods: logical indicating if the full variance-covariance matrix should be returned also in case of an over-determined system where some coefficients are undefined and <code><a href="coef.html">coef</a>(.)</code> contains <code>NA</code>s correspondingly. When <code>complete = TRUE</code>, <code>vcov()</code> is compatible with <code>coef()</code> also in this singular case.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>additional arguments for method functions. For the <code><a href="glm.html">glm</a></code> method this can be used to pass a <code>dispersion</code> parameter.</p> </td></tr> </table> <table summary="R argblock"> <tr valign="top"><td><code>aliased</code></td> <td> <p>a <code><a href="../../base/html/logical.html">logical</a></code> vector typically identical to <code>is.na(coef(.))</code> indicating which coefficients are ‘aliased’.</p> </td></tr> <tr valign="top"><td><code>vc</code></td> <td> <p>a variance-covariance matrix, typically “incomplete”, i.e., with no rows and columns for aliased coefficients.</p> </td></tr> </table> <h3>Details</h3> <p><code>vcov()</code> is a generic function and functions with names beginning in <code>vcov.</code> will be methods for this function. Classes with methods for this function include: <code>lm</code>, <code>mlm</code>, <code>glm</code>, <code>nls</code>, <code>summary.lm</code>, <code>summary.glm</code>, <code>negbin</code>, <code>polr</code>, <code>rlm</code> (in package <a href="https://CRAN.R-project.org/package=MASS"><span class="pkg">MASS</span></a>), <code>multinom</code> (in package <a href="https://CRAN.R-project.org/package=nnet"><span class="pkg">nnet</span></a>) <code>gls</code>, <code>lme</code> (in package <a href="https://CRAN.R-project.org/package=nlme"><span class="pkg">nlme</span></a>), <code>coxph</code> and <code>survreg</code> (in package <a href="https://CRAN.R-project.org/package=survival"><span class="pkg">survival</span></a>). </p> <p>(<code>vcov()</code> methods for summary objects allow more efficient and still encapsulated access when both <code>summary(mod)</code> and <code>vcov(mod)</code> are needed.) </p> <p><code>.vcov.aliased()</code> is an auxiliary function useful for <code>vcov</code> method implementations which have to deal with singular model fits encoded via NA coefficients: It augments a vcov–matrix <code>vc</code> by <code><a href="../../base/html/NA.html">NA</a></code> rows and columns where needed, i.e., when some entries of <code>aliased</code> are true and <code>vc</code> is of smaller dimension than <code>length(aliased)</code>. </p> <h3>Value</h3> <p>A matrix of the estimated covariances between the parameter estimates in the linear or non-linear predictor of the model. This should have row and column names corresponding to the parameter names given by the <code><a href="coef.html">coef</a></code> method. </p> <p>When some coefficients of the (linear) model are undetermined and hence <code>NA</code> because of linearly dependent terms (or an “over specified” model), also called “aliased”, see <code><a href="alias.html">alias</a></code>, then since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version 3.5.0, <code>vcov()</code> (iff <code>complete = TRUE</code>, i.e., by default for <code>lm</code> etc, but not for <code>aov</code>) contains corresponding rows and columns of <code>NA</code>s, wherever <code><a href="coef.html">coef</a>()</code> has always contained such <code>NA</code>s. </p> <hr /><div style="text-align: center;">[Package <em>stats</em> version 3.6.0 <a href="00Index.html">Index</a>]</div> </body></html>