Hi

I was trying to estimate a spatial panel model and got stuck. Here's what I
did and corresponding error I got.

I have a panel dataset for 31 years but each year has different number of
observation of different US counties. So I first created a balanced panel
where each year have 3015 observation.
I have a shapefile, which I got from US census data, having 3109
observation of different US county. Now to match it with my data, I deleted
94 observation from the shapefile and now I have both my dataset and shape
file with 3015 observation. I created a k-nearest neighbor weight matrix
based on the modified shapefile.
Then I tried to open this weight matrix in R, and got the following error:

I used
uscounties.nb = read.gwt2nb("knnmatrix15thnov.gwt")

Warning messages:
1: In read.gwt2nb("knnmatrix15thnov.gwt") : region.id not named POLY_ID
2: In read.gwt2nb("knnmatrix15thnov.gwt") :
  6, 8, 43, 44, 45, 57, 61, 64, 65, 67, 68, 69, 70, 177, 180, 184, 219,
227, 245, 249, 253, 254, 415, 416, 556, 1393, 1397, 1418, 1425, 1427, 1522,
1524, 1542, 1543, 1548, 1558, 1560, 1567, 1582, 1583, 1585, 1658, 1659,
1664, 1665, 1670, 1774, 1775, 1784, 1790, 1810, 1812, 1815, 1990, 1991,
1992, 1993, 2039, 2055, 2089, 2104, 2232, 2238, 2246, 2315, 2354, 2484,
2485, 2489, 2512, 2518, 2519, 2576, 2586, 2670, 2823, 2837, 2847, 2896,
2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907, 2908,
2909, 2910, 2911 are not origins
3: In read.gwt2nb("knnmatrix15thnov.gwt") :
  6, 8, 43, 44, 45, 57, 61, 64, 65, 67, 68, 69, 70, 177, 180, 184, 219,
227, 245, 249, 253, 254, 415, 416, 556, 764, 1393, 1397, 1418, 1425, 1427,
1522, 1524, 1542, 1543, 1548, 1558, 1560, 1567, 1582, 1583, 1585, 1658,
1659, 1664, 1665, 1670, 1774, 1775, 1784, 1790, 1810, 1812, 1815, 1990,
1991, 1992, 1993, 2039, 2055, 2089, 2104, 2232, 2238, 2246, 2315, 2354,
2484, 2485, 2489, 2512, 2518, 2519, 2576, 2586, 2670, 2823, 2837, 2847,
2896, 2897, 2898, 2899, 2900, 2901, 2902, 2903, 2904, 2905, 2906, 2907,
2908, 2909, 2910, 2911 are not destinations

So I used
listw = nb2listw(uscounties.nb, zero.policy=TRUE)
Now I could use my weight matrix.

But as I tried to use this weight matrix for regression I got error.

I used: model1 <- spfeml(fm, data = data, listw = listw, effects =
"spfe",method = "eigen")
and got the following error

Warning: x may not contain an intercept if fixed effects are specified
Error in lag.listw(listw, u) : object lengths differ

I'm stuck at this point and could not figure out the error. I would really
appreciate any comment or suggestion to deal with these error messages and
also any reference on spatial panel estimation in R.
And sorry for making the post so long, Just wanted to share every error
message I got.

Thanks
Anwesha

	[[alternative HTML version deleted]]

