criterion for the best fitting model if using GMM?
On Fri, 28 Aug 2015, Qiuhua Ma wrote:
Hi, I have two big datasets:10,000 observations and 40,000. I tried to use ML so that I can use maximized LL or AIC to decide the best fitting model! However it took so long and most of the time R was turned off automatically.
Please do read the posting instructions, and provide sample code illustrating your problem. Your main problem is not reading the documentation, as you will see that you have ignored the method= argument (assuming that your neighbours are sparse). Fitting ML models with n=40K with method="Matrix" for symmetric weights and method="LU" for asymmetric weights just works for sparse weights. If you are using dense neighbours, you should not be surprised that things become difficult. Using AIC is questionable anyway in econometrics, as you should know the correct model from theory, or possibly use Bayesian model selection. Stata spreg ml returns e(ll): http://econ-server.umd.edu/~Prucha/Papers/SJ_SPREG%282013%29.pdf
GMM seems like a better option. I searched the literature but cannot find the criterion for the best fitting model. Any idea?
This illustrates why you should indicate the published paper defining the LL of such GMM-estimated models:
library(sem) AIC(tsls(Q ~ P + D, ~ D + F + A, data=Kmenta))
Error in UseMethod("logLik") :
no applicable method for 'logLik' applied to an object of class "tsls"
logLik(tsls(Q ~ P + D, ~ D + F + A, data=Kmenta))
Error in UseMethod("logLik") :
no applicable method for 'logLik' applied to an object of class "tsls"
Stata spreg g2sls does not returm a log likelihood.
Please do check the literature before posting speculations.
Roger Bivand
thanks, Chelsea [[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