search for: sse_calc

Displaying 1 result from an estimated 1 matches for "sse_calc".

2013 Oct 17
0
Singular Matrix 'a' in solve
...;- yfm[,1:(tt-1)] out <- matrix(t(yfm),nrow=nrow(yfm)*ncol(yfm),ncol=1) out } *Then before the computation, something is being setup* x <- cbind(lpop, linv, lgov, llife, cf) … (skip as I think is unrelated with the problem encounter) *And, in the early stage of computation:* sse_calc <- function(y,x){ e <- y-x%*%qr.solve(x,y) out <- t(e)%*%e out } … *It comes out with* Error in qr.solve(x, y) : singular matrix 'a' in solve I thought only square matrix would have this kind of problem. Would qr() help in this case? Or is the...