[R-sig-Geo] sarorderedprobit panel data

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Sun Apr 18 18:51:56 CEST 2021


On Sat, 17 Apr 2021, Ryan, Alex via R-sig-Geo wrote:

> I am attempting to use the sarorderedprobit function (within the
> "spatialprobit" package) to perform a SAR Ordered Probit estimation using
> panel data.
>
> I have imported my spatial weight matrix (representing the 50 states of the
> US) using the following script:
>
> Weight_GAL<- read.gal(File, override.id=TRUE)
> Weight_List<nb2listw(Weight_GAL,style="W", zero.policy=TRUE)
> W<-listw2mat(Weight_List)
>
> which successfully imports the 50x50 sparse matrix.
>
> The following sarorderedprobit is run:
>
> sarorderedprobit(formula, W=W, showProgress=TRUE)
>
> When using cross-sectional data with 50 observations, the script
> successfully estimates the sarorderedprobit model. However, when panel data
> is used with 3 years (i.e., 150 observations), the script returns the
> following error:
>
> "Error: Matrices must have same dimensions in .Arith.Csparse(e1,e2,
> .Generic, class. = dgCMatrix")".
>
> The issue here seems to be related to the use of a 50x50 weight matrix with
> 150 observations. Unfortunately, I have not found any references to using
> the sarorderedprobit function with panel data. Can anyone provide guidance
> on whether the sarorderedprobit function supports estimation using panel or
> timeseries datasets?

Perhaps use a Kronecker product to provide W with three block-diagonal 
cross sectional spatial weights matrices (assuming that your data is 
ordered with time varying slower than space?). Could you work up a data 
set such as those used in splm and add an ordinal response?

Roger

>
> 	[[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
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
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