<!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: Standard error for lim.fit</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 reg.std.err"><tr><td>reg.std.err</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Standard error for lim.fit</h2>

<h3>Description</h3>

<p>Calculate standard error for the outcome of lm.fit(). This function is built for reg.linreg for higher efficiency only.
It can't be used for calculating standard error in general operation.
</p>


<h3>Usage</h3>

<pre>
reg.std.err(SSE,dof)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>SSE</code></td>
<td>
<p>:error sum of squared aka. residual sum of squared</p>
</td></tr>
<tr valign="top"><td><code>dof</code></td>
<td>
<p>:degree of freedom</p>
</td></tr>
</table>


<h3>Examples</h3>

<pre>
X &lt;- as.matrix(cbind(1,EuStockMarkets[,1:2])) # create the design matrix
Y &lt;- as.data.frame(EuStockMarkets)$FTSE
fit &lt;- lm.fit(x = X, y = Y)
SSE &lt;- sum((Y - fit$fitted.values)^2)
dof &lt;- reg.dof(fit)
reg.std.err(SSE,dof)
</pre>


</body></html>
