Message-ID: <87ftwvkur2.fsf@gmail.com>
Date: 2018-10-24T19:30:25Z
From: Jeremie Juste
Subject: logLik value of the spml spatial panel model
In-Reply-To: <92164cd4-6b69-2011-c727-344e1a0dffb9@mail.montclair.edu> (Danlin Yu's message of "Mon, 22 Oct 2018 11:37:20 -0400")
Danlin Yu <yud at 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