[R] Problem when fitting a constant response
(Ted Harding)
Ted.Harding at nessie.mcc.ac.uk
Fri Oct 25 13:55:53 CEST 2002
On 25-Oct-02 ZABALZA Isabelle wrote:
> I would like to treat a very simple case : to fit a linear model
> with 5 parameters (including main terms, interactions and quadratic
> terms using a central composite design with 27 runs) for a constant
> response (e.g resp = 100.0). The fitting process works and return
> me a good intercept value (the value of my constant) and some
> negligeable effects (around e-15). But, I don't understand some
> results :
> the t values (or the F stat) indicates some influent parameters
> (although they are negligeable in comparison with the intercept)
> and the R2 value is not equal to 1 (Multiple r2 = 0.72, and
> adj r2 = -0.187), although the residuals are near zero. I know,
> it is a very special case (regression is not necessary), but it is
> just to understand what is happening.
Probably what is happening is that the fitted values are computed
from the fitted constants, so the results are not _exactly_ equal
to the constant value you put in to start with (owing to rounding
or truncation errors in the machine computation). The intercept
would be slightly different from the constant as stored internally,
but this would not be visible in its displayed value (unless you
displayed it to say 20 significant figures). However, the effects,
which should be exact zeros, are showing up as very small numbers,
which is the clue to what is going on.
Consequently, the fitted values differ very slightly from the "data",
so there some very small sums of squares both for residuals and for
regression effects. Your t and F statistics are ratios of these
very small numbers, and may well come out looking like large
numbers (strictly speaking, you should be dividing zero by zero
and getting a "NaN" result).
Ted.
--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 25-Oct-02 Time: 12:55:53
------------------------------ XFMail ------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list