Skip to content
Prev 138211 / 398506 Next

Need help to locate my mistake

On 3/03/2008, at 1:58 PM, Louise Hoffman wrote:

            
This should be (something like)

	tr((Y - X%*%theta))%*%(Y-X%*%theta)/(n-p)

where X is your design matrix.

To get the information in R:

	fit <- lm(fpi ~ rtime,data=fuelData)
	summary(fit)

This tells you the residual standard error (standard deviation) is
7.681.  Typing

	summary(fit)$sigma

gives the answer to more decimal places --- 7.681288.

The residual variance can of course be obtained by

	summary(fit)$sigma^2

Note that the name ``sigma'' is bad --- this terminology should
be reserved for population quantities.  What we have is ``sigma-hat'',
an *estimate* of sigma.

Note also that for your fuel data the residual variance is pretty
much meaningless since your model is highly inappropriate for these  
data.

		cheers,

			Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}