[R-sig-Geo] Question spdep package - aliased variables and NA z-values
Roger Bivand
Roger@B|v@nd @end|ng |rom nhh@no
Tue May 28 11:37:20 CEST 2019
On Mon, 27 May 2019, Raphael Mesaric via R-sig-Geo wrote:
> Dear all,
>
> My model consists of observations for all four seasons, and each of the
> seasons is analyzed with respect to five different time slots. All of
> these observations are referring to the same grid, which means that my
> neighborhood matrix is repeated twenty times (I took the neighborhood
> matrix of the original grid and modified the entries in such a way that
> I have a diagonal matrix where each diagonal block entry consists of the
> original neighborhood object, with adjusted values).
>
> I recently run my model with the errorsarlm() and lagsarlm() functions.
> It worked fine, and the results coincide well with the linear regression
> results, which is great. However, there are a few other strange things:
These are not really appropriate models, maybe look at the splm package
for panel/longitudinal equivalents. To debug the aliasing in the model
fitting functions in spatialreg (no longer spdep), please provide a
reproducible example, preferably from a built-in data set.
Roger
>
> In the lag-model, I have only estimates for some variables, but the
> z-value is indicated as NA (for the error model it works fine). After
> running the SAR models, R tells me that the two dummy variables for the
> seasons are aliased. However, in the linear regression I did not have
> any problems, and the variables are not correlated.
>
> I think the second issue might be related to the fact that the number of
> observations seems to correspond to the number of observations for one
> season, instead of all four seasons. In other words, it looks like R has
> realized that the neighborhood repeats itself for each season.
> Interestingly enough, R has not realized that the pattern repeats itself
> inside the seasons as well for the time slots.
>
> Or is there another possible reason for the fact that the number of
> observations corresponds to only one fourth of all the observations
> actually included?
>
> Has anybody experienced these issues as well? Any idea on how to resolve
> these problems would be greatly appreciated.
>
> Thank you in advance!
>
> Best regards,
>
> Raphael Mesaric
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; e-mail: Roger.Bivand using nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
More information about the R-sig-Geo
mailing list