[Splm-commits] Missing data? Link between contiguity matrix and actual data?
Wouter Steenbeek
wouter.steenbeek at gmail.com
Tue Oct 18 22:52:27 CEST 2011
Hello,
I've recently found out about splm/spml, and I started trying some stuff.
Thank you for all the work you've put into this. Keeping in mind that I'm an
R newbie, I have two questions:
1. It seems spml/splm does not run when I have missing values in my
dependent variable. Is that correct? I haven't fully tested it all, so I'm
not sure what the problem is exactly for my data. Perhaps this is when all
values for one level2 unit are missing, or perhaps even when only one value
(so one value of a level2 unit-time combination) is missing. In any event,
it seems that under the hood, it tries to combine the spatial contiguity
matrix with my datafile and this results in a failure if I have missing
values.
a. Will there be any way to deal with missing data in future developments
of spml?
b. What do you advise to do right now, if I want to use spml? (Delete
these cases? Impute the mean? Multiple imputation would be nice, but how to
combine that with spml?)
2. Related to the first question. I have a shapefile which I read through
"readShapePoly" and then make a contiguity matrix using command nb2listw.
How does spml (or R) then deal with this? Is the "ordering" of the .dbf file
als the order of the variables in the listw object? If that's the case, does
that mean I always have to make certain that the level2 units in my actual
datafile (in your example, "Produc") are also ordered in the exact same way?
Perhaps this is because I'm new to R, but when I write my listw as a
dataframe, the variable names are V1, V2, etc. However, my level2 unit names
in my datafile have totally different names. So I guess my question is: how
does R/spml know which Vx-Vy combination in the contiguity matrix belongs to
which level2 unit in the datafile?
Kind regards,
Wouter Steenbeek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/splm-commits/attachments/20111018/a672c3e0/attachment.htm>
More information about the Splm-commits
mailing list