[R-sig-Geo] sarorderedprobit panel data
Ryan, Alex
@ry@n19 @end|ng |rom jcu@edu
Mon Apr 19 01:59:45 CEST 2021
Hi Roger,
Thank you for the recommendation, I see now that you have previously shared
similar advice on the r-sig-geo forum. The kronecker calculation worked
well and resolved the error message previously shared. Regarding your
recommendation to include an ordinal response: is your recommendation to
include explanatory variables representing the time period for each
observation in the model? I do not see similar variables included in the
examples reported by the splm documentation as you have referenced.
On Sun, Apr 18, 2021 at 11:52 AM Roger Bivand <Roger.Bivand using nhh.no> wrote:
> 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
>
[[alternative HTML version deleted]]
More information about the R-sig-Geo
mailing list