spatial panel regression in R: Error with spgm
问题 I have one problem with the spatial regression code shown below ( Code Example ). After I run the regression I get the following error Error in listw %*% as.matrix(ywithin) : Cholmod error 'X and/or Y have wrong dimensions' at file ../MatrixOps/cholmod_sdmult.c, line 90 When I remove the spatial dimension from the regression, the regression runs perfectly, so I guess the error might be in the spatial weight matrix. Could someone please help me address why this error occurs and recommend a