r - Matrix multiplication giving NA -


i'm attempting simple matrix multiplication, has never given me issue before.

i have x matrix (nxfe) , matrix of observations, y (nx1). purposes of example lets

x <- matrix(c(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), nrow=4) y <- matrix(c(1, 2, 3, 4), nrow=4) 

simple code multiplication

xt <- t(x) xy <- xt%*%y 

however, when this, matrix of na's (nx1).

this has never happened before. have checked , there appropriate values in matrices. appreciated.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -