Skip to content
Prev 27209 / 29559 Next

Common Factors test in R

Thank you very much :)

-----Original Message-----
From: Roger Bivand [mailto:Roger.Bivand at nhh.no]
Sent: Tuesday, April 9, 2019 12:43 PM
To: Hul?nyi Martin <martin.hulenyi at vlada.gov.sk>
Cc: r-sig-geo at r-project.org
Subject: RE: [R-sig-Geo] Common Factors test in R
On Mon, 8 Apr 2019, Hul?nyi Martin wrote:

            
No, you need to attract the attention of the package maintainer, and either contribute the missing method (spml is maximum likelihood based, so does have the value internally, it is simply neither returned, nor made accessible by a logLik() method), or hope that the maintainer might do so.
The package lives on R-Forge at

https://r-forge.r-project.org/projects/splm/

so you can check out the package with anonymous SVN:

svn checkout svn://svn.r-forge.r-project.org/svnroot/splm/

make the changes, build and install locally, check the results, and take svn diff diffs to send back to the maintainer. That is after all how open source software works. You could start in R/spreml.R, checking to see where the optimized objective function values go and where they are returned if they are.

In your case:
NULL
[1] -8678.189

Even without working on the code:

debug(spml)
debug(splm:::spfeml)
debug(sperrorlm)

lets you see what is going on to some extent (for spem). In the spem case, opt$objective is assigned to LL, but not returned by sperrorlm() in R/likelihoodsFE.R line 466/467. Had it been, writing logLik() methods would be easier, although seeing which model is nested in which given all the variants is hard.

Further, Durbin impacts are not (yet) available, I think.
No, it doesn't compare two spatial models, but tests aspatial panel models for many kinds of mis-specification if I understand correctly.

Hope this helps,

Roger
--
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 at nhh.no
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
Autorom tejto spr?vy elektronickej po?ty je Martin Hul?nyi. T?to spr?va je ur?en? v?lu?ne jej adres?tovi. Inform?cie a ?daje, ktor? s? v nej uveden?, alebo ktor? s? obsiahnut? v jej prilo?en?ch s?boroch, m??u by? inform?ciami alebo ?dajmi chr?nen?mi pod?a platn?ch pr?vnych predpisov v Slovenskej republike. V pr?pade, ak nie ste ur?en? ako prij?mate? tejto spr?vy alebo jeho opr?vnen? z?stupca, upozor?ujeme V?s, ?e inform?cie a ?daje v nej uveden? nie ste opr?vnen? sprac?va?, ani ich spr?stupni? alebo poskytn?? tretej osobe alebo ich zverejni?. Ak ste nedopatren?m prijali alebo zachytili tuto spr?vu elektronickej po?ty, dovo?ujeme si V?s po?iada?, aby ste ju zaslali sp?? na elektronick? adresu jej odosielate?a, a aby ste ju n?sledne zmazali zo svojho po??ta?a a z Va?ej schr?nky elektronickej po?ty. Odosielate? tejto spr?vy nenesie zodpovednos? za ?kody sp?soben? nespr?vnym pou?it?m tejto spr?vy elektronickej po?ty a jej pr?loh.

The author of this e-mail message is Martin Hul?nyi. This message is intended solely for the recipient. The information and data contained therein or contained in its enclosed files may be information or data protected under applicable laws in the Slovak Republic. If you are not designated as the recipient of this message or its authorized representative, we would like to inform you that the information and data contained therein are not authorized to process or make them available to third parties or to disclose them. If you have received or downloaded this e-mail message accidentally, we ask you to send it back to the e-mail address of the sender and then delete it from your computer and from your e-mail. The sender of this message is not responsible for damages caused by incorrect use of this e-mail message and its attachments.