I have some SAS output from PROC GLM but not access to the program. The
regression is, in R terms, y~gp1+gp2 where gp1 is a factor of 4 levels and
gp2 is a factor of 10 levels. The regression uses weights and these have
been normalised to add to the number of units, otherwise the scale
parameter is wrong.
The puzzle is why, when the X'X matrix is not singular, PROC GLM insists
on using a generalised inverse. There is no redundancy and there are, as
expected, 14 coefficients. I can invert the matrix and play all sorts of
games in R and the data are identical.
The coefficients do not correspond to the R results (obviously they are in
different order and SAS has dropped a different variable in place of the
intercept etc).
However the mean predictions do correspond exactly but the upper
prediction interval does not, which implies that SAS is calculating a
larger RMS error whereas the residual analysis, if anything, shows
something slightly smaller.
Can any SAS expert suggest (a) why it uses a generalised inverse and (b)
why the RMS error used should be different.
I have compared results from these two programs before and found them to
be exactly the same.
TIA
John
John Logsdon "Try to make things as simple
Quantex Research Ltd, Manchester UK as possible but not simpler"
[log in to unmask] [log in to unmask]
+44(0)161 445 4951/G:+44(0)7717758675 www.quantex-research.com
|