[R-sig-Geo] logLik value of the spml spatial panel model

Jeremie Juste jeremieju@te @ending from gm@il@com
Wed Oct 24 21:30:25 CEST 2018


Danlin Yu <yud using mail.montclair.edu> writes:


Hello,

Could you post the exact command you have used with all the relevant
options? If you dug into the code then you've noticed quite a lot of
nested control structures so a clear idea of your commands might be
useful here.

for instance

    fm <- logc ~ logp+ logpn + logy
    sarpool <-  suppressWarnings(splm::spml(fm,cigar,
                                            listw=lwcig,
                                            model="pooling",
    spatial.error="none",lag=TRUE,index=c("region","time")))

Will produce the logLik
    sarpool$logLik


>From what I've understood at some point the function <nlminb> is always
called so a likelihood value is always produced although not always
returned.


Best regards,

Jeremie



> Dear List:
>
> In a recent attempt to compare spatial panel models using splm
> package, I intend to use the logLik value that was produced by the
> spml() routine. When I ran the model, I realize that the logLik value
> is not always produced, especially when the spatial.error is set to
> "b", a NULL value is returned. I know I must have missed something
> here, but can anyone point out why the logLik value is not returned
> when the spatial.error value is set to "b" (a spatial panel lag model
> always return a logLik value). I tried a bit to dig into the codes,
> but didn't find much that can answer my question.
>
> Thank you.
>
> Best,
>
> Danlin



More information about the R-sig-Geo mailing list