[R-sig-Geo] The spml function does not work

Roger Bivand Roger.Bivand at nhh.no
Sun Jun 26 19:10:12 CEST 2016


On Sun, 26 Jun 2016, Edoardo Baldoni wrote:

> Dear R users,
>
> I am trying to benchmark my code for estimating spatial panels with the
> functions in the splm package. The problem is that I cannot make the spml
> functions (from package splm) work. Not even the ones in the standard
> examples provided. Here is one of the examples that can be found in the R
> help page (http://127.0.0.1:24033/library/splm/html/spml.html) and then the
> error that comes out:
>
> data(Produc, package = "plm")
> data(usaww)
> fm <- log(gsp) ~ log(pcap) + log(pc) + log(emp) + unemp
> fespaterr <- spml(fm, data = Produc, listw = mat2listw(usaww),
>                   model="within", spatial.error="b", Hess = FALSE)
>
> Error in solve(crossprod(xco), crossprod(xco, yco)) :
>  error in evaluating the argument 'a' in selecting a method for function
> 'solve': Error in crossprod(xco) :
>  could not find symbol "..." in environment of the generic function
>

You did not provide the output of sessionInfo(), showing which packages 
were visible in the search path. This code is run in:

https://cran.r-project.org/web/checks/check_results_splm.html

on many platforms and works, so it feels as though you may have another 
solve() in the search path. Can you try it without loading any other 
packages before splm?

Hope this clarifies,

Roger

>
> Do you have any idea of what is happening here ? Thanks
>
>
> Edoardo
>
> 	[[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
http://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
http://depsy.org/person/434412



More information about the R-sig-Geo mailing list