You've missed the complete=TRUE argument (and also crossprod) as in
crossprod(qr.Q(qr(m), TRUE),
matrix(c(1,2,3,4,2,3,4,5,1,1,1,1,2,2,2,2),nrow=4))
On Tue, 15 May 2007, Sebastian Bauer wrote:
> Dear R people,
>
> I do not have much knowledge about linear algebra but currently I need
You need complete = TRUE. See ?qr.Q
> m <- matrix(c(1,0,0,0,1,0,0,0,1,0,0,1), ncol = 3)
> y <- matrix(c(1,2,3,4,2,3,4,5,1,1,1,1,2,2,2,2), nrow = 4)
> t(qr.Q(qr(m), complete = TRUE)) %*% y
[,1] [,2] [,3] [,4]
[1,] -1 -2 -1 -2
[2,] -4 -5 -1 -2
[3,]3412
[4,] -2
Dear R people,
I do not have much knowledge about linear algebra but currently I need
to understand what the function qr.qty is actually doing. The
documentation states that it calculates t(Q) %*% y via a previously
performed QR matrix decomposition.
In order to do that, I tried following basi