[R-sig-Geo] Error in splm random effects ML model

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Wed Feb 15 17:12:27 CET 2023


On Wed, 15 Feb 2023, Denys Dukhovnov via R-sig-Geo wrote:

> Dear community,
>
> I am trying to run a spatial panel random effects SEM model using splm 
> package on a balanced spatial panel of N = 2472 and T = 4, and weights 
> are based on k = 6 nearest neighbors. I encounter this error, which I 
> can't find anything about in the documentation or online.
>
> spml(formula = mx.standard ~ I.score, 
>                          data = analysis.subset,
>                          listw = listw.wgts,
>                          effect = "individual",
>                          model = "random", 
>                          lag = FALSE,
>                          spatial.error = "b",
>                          index = c("Group", "Year"))
>
> Error in .C64("aplsb1", SIGNATURE = c(SS$signature, SS$signature, 
> "double", : NAs in argument 7 and 'NAOK = FALSE' (dotCall64)

Please at least provide the output of traceback() after the error (it does 
not crash, it error-exits correctly). Also provide the output of 
sessionInfo() - versions of underlying packages may matter (I'm thinking 
of dotCall64 and packages it uses). .C64() is not called by splm functions 
directly.

Does the error persist on a fully updated system on the same OS?

What happens on a different platform if available?

Ideally, provide a fully reproducible minimal example using built-in data, 
or provide your data and the code used to create analysis.subset and 
listw.wgts, so that the running the code creating the error can be 
reproduced exactly. The error message reports NAs, are the data complete?

Roger


>
> Unlike the same specification but with fixed effects (with model = 
> "within" argument), the one above takes a long while to run until it 
> crashes. As far as I can tell, there are no memory issues.
>
> An alternative spatial random effects using spgm() command runs OK, as 
> do non-spatial fixed and random effects models using plm(). For the one 
> above I could use spgm(), but I would prefer to keep all my models in 
> the maximum likelihood estimation for consistency.
>
> Any clarifications as to the nature of the error are welcome. 
>
> Thank you.
>
>
> Denys Dukhovnov
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-sig-geo&data=05%7C01%7CRoger.Bivand%40nhh.no%7Cd4a3c3a836f44c598f9608db0f6250a2%7C33a15b2f849941998d56f20b5aa91af2%7C0%7C0%7C638120687160554379%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Oa5KOUxlzjHxBzBfAd12W9WrTRVBynr1bYdJlST%2F17g%3D&reserved=0
>

-- 
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