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

Roger Bivand Roger@Biv@nd @ending from nhh@no
Thu Oct 25 10:27:19 CEST 2018


On Thu, 25 Oct 2018, Jeremie Juste wrote:

> Hello,
>
> Indeed the Loglik was not returned here by the function sarpanelerror
> here. I have provided a patch (attached). It's an ugly one but better
> than nothing. So instead of running spml you could run test..spml after
> sourcing the file to obtain the fespaterr$logLik.
>
> fespaterr <- test..spml(fm, data = Produc, listw = mat2listw(usaww),
>                   model="within", spatial.error="b", Hess = FALSE)
>
>
> The only modification I've made is in the function test..(sperrorlm)
> where I've added ll=LL in the list returned.

Good, thanks! And good that Danlin reported that your addition of the 
value to the returned object appeared to work for him. I've added the splm 
maintainers to this reply. If you can produce a patch file using diff, it 
would be easier to add the extra returned value. It may be, however, that 
there was a reason for omitting it, so checks to verify that it actually 
is a logLik value on the same basis as other logLik values (not from an 
abbreviated log-likelihood function used for fitting by omitting 
constants) would be helpful. It would be good to provide logLik methods 
for the ML fitted model objects.

Again thanks for a good example of collaboration to benifit us all.

Roger

>
>
> Hope it helps,
>
> Jeremie
>
>
>
>

-- 
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
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en



More information about the R-sig-Geo mailing list