[R-sig-Geo] spml and logLik, help!
Ariel Ortiz-Bobea
aortizbobea at arec.umd.edu
Thu Nov 15 20:48:03 CET 2012
After some digging, I realized the problem is that the log-likelihood is
simply not exported by one of the internal functions (splm:::sperrorlm).
To fix this simply modify that function. After loading splm type:
fixInNamespace("sperrorlm", "splm")
And manually add "ll=LL" as an element to the "return" list at the end of
the function so that it reads:
return <- list(coeff = betas, lambda = lambda, s2 = s2, rest.se = rest.se,
lambda.se = lambda.se, asyvar1 = asyvar1, ll=LL)
This LL (i.e. LogLik) object was missing.
A less elegant solution is to capture the text after running the function
when the option quiet=F.
Hope this saves some time to others.
Cheers.
Ariel
-----
Ariel Ortiz-Bobea
PhD Candidate in Agricultural & Resource Economics
University of Maryland - College Park
--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/spml-and-logLik-help-tp7581581p7581725.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo
mailing list