Matrix multiplication in R: requires numeric/complex matrix/vector arguments
Error in Ws %*% as.matrix(endog) : requires numeric/complex matrix/vector arguments
where ‘Ws’ is a N*N spatial weight matrix and ‘endog’is N*3 (we have three endogenous variables) I cannot understand why this error occours because when I set only one endogenous variable my code works well. What's more, three endogenous variables are not dummy. Is it because that two of these endogenous variables are interaction? Or because of the package 'splm/spgm' cannot allow for extra endogenous variables?