Rees, Lisa Marie (MU-Student)
2008-Jul-14 00:24 UTC
[R] Moran's I test- Ordinal Logistic Regression Model
Hi, I am trying to do a Moran's I test on an ordinal logistic regression model. I have a simple spatial weights matrix listed below I would like to use. Y1 0 0 0 0 0 0 0 0 0 1 1 0 0 0 0 1 1 0 1 1 0 0 0 0 1 1 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 1 1 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 0 0 1 1 I try to run the test as follows- moran.test(order$resid, y). It then gives me an error- "Error in moran.test(resid(order), y) : y is not a listw object" Can I transform my matrix into a listw object or use some other test where I can use my simple matrix to perform the test? Also, is using $resid for the ordinal logistic regression the proper way to run the moran's I test? Thanks for any help you can provide me. Lisa