famuvie / breedR

Statistical methods for forest genetic resources analysts
http://famuvie.github.io/breedR/
GNU General Public License v3.0
31 stars 24 forks source link

AR model Error: non-conformable matrix dimensions in x %*% y #27

Closed famuvie closed 9 years ago

famuvie commented 9 years ago

VS reports this error when doing

variogram(selmod)

where selmod is a spatial autoregressive model.

famuvie commented 9 years ago

Thanks VS for reporting. This happens because the last random effect in the AR process is not associated with any observation. The last column(s) of the incidence matrix are (wrongly) discarded as they are zeros. Later multiplication with the predicted spatial process failed because of non-conformable dimensions. This is used for computing the fitted values, which are used to compute the residuals, which are used to compute the variogram.