Dear list, I had missed this; following personal communication from the original poster, here is my answer, with a quick way to get things done despite this small bug. Please see below. Best, Giovanni
-----Messaggio originale----- Da: Millo Giovanni Inviato: mercoledì 17 ottobre 2012 16.08 A: 'Patrick Meyfroidt' Cc: gianfranco.pi...@mail.wvu.edu Oggetto: R: Problem in splm : bsktest CLMmu cannot find if panel is balanced Hello. Thanks, glad to help if we can, of course. I have reproduced the problem. Looks like in the very first row of splm:::clmmtest the 'index' argument doesn't get passed on to spfeml(). We'll fix this ASAP, eiher adding the 'index' argumentr explicitly or through '...'. For now, a quick solution for you is to circumvent the issue providing a dataset that doesn't need the 'index' argument, i.e. simply reordering your dataset with: - individual index in the first column - time index in the second one then everything should work fine (as it does on my examples). Please let me know if it works. Best, Giovanni Giovanni Millo, PhD Research Dept., Assicurazioni Generali SpA Via Machiavelli 4, 34132 Trieste (Italy) tel. +39 040 671184 fax +39 040 671160 -----Messaggio originale----- Da: Patrick Meyfroidt [mailto:patrick.meyfro...@uclouvain.be] Inviato: mercoledì 17 ottobre 2012 15.36 Oggetto: Problem in splm : bsktest CLMmu cannot find if panel is balanced Dear list, With a balanced spatial panel dataset, I'm trying to test for random and spatial autocorrelation effects using bsktest in package splm. I'm using different tests in this method, following Millo and Piras 2012. The test CLMlambda, which tests for spatial autocorrelation under possible random effects, works fine. But the test CLMmu, which tests for the opposite - presence of random effects under possible spatial autocorrelation - invariably returns: Error in if (!balanced) stop("Estimation method unavailable for unbalanced panels") : missing value where TRUE / FALSE needed My code is: bsktest.abd.9196 <- bsktest(model.abd.9196, data = rusp9196.subsvars, index ="index", listw = wrus.knb5.lw, test="CLMmu") Which runs fine for CLMlambda. And LM1, LM2, and LMH also work. Looking into the code of bsktest here: https://r-forge.r-project.org/scm/viewvc.php/pkg/R/bsktest.R?view=markup&root=splm I don't even see where the test for balanced panel occurs, but what I don't understand is that it works for CLMlambda. If someone has an idea? Thanks very much, Patrick Meyfroidt ------ F.R.S. - FNRS and Université catholique de Louvain - UCLouvain Earth and Life Institute Georges Lemaître Centre for Earth and Climate Research (TECLIM) Place Pasteur 3, bte L4.03.08 1348 Louvain-la-Neuve Belgium http://www.uclouvain.be/teclim http://www.redd-alert.eu/ Ai sensi del D.Lgs. 196/2003 si precisa che le informazi...{{dropped:12}} _______________________________________________ R-sig-Geo mailing list R-sig-Geo@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-geo