全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 R语言论坛
3147 1
2008-09-23

各位高手帮帮小弟吧!

我现在用GMM估计一个函数。但是,用optim得到的结果总是不稳定。当初始值改变的时候,估计的结果也会发生改变。请问哪位大虾能帮我想象办法啊?

多谢多谢!

二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

全部回复
2015-1-22 22:01:47
你用gmm()函数的吧?
gmm(g,x,t0=NULL,gradv=NULL, type=c("twoStep","cue","iterative"),
wmatrix = c("optimal","ident"), vcov=c("HAC","iid","TrueFixed"),
kernel=c("Quadratic Spectral","Truncated", "Bartlett", "Parzen", "Tukey-Hanning"),
crit=10e-7,bw = bwAndrews, prewhite = FALSE, ar.method = "ols", approx="AR(1)",
tol = 1e-7, itermax=100,optfct=c("optim","optimize","nlminb", "constrOptim"),
model=TRUE, X=FALSE, Y=FALSE, TypeGmm = "baseGmm", centeredVcov = TRUE,
weightsMatrix = NULL, traceIter = FALSE, data, eqConst = NULL,
eqConstFullVcov = FALSE, ...)
  

Only when the dimension of  is 1, you can choose between the algorithm optim or optimize. In that case, the former is unreliable. If optimize is chosen,"t0" must be 1  2 which represents the interval in which the algorithm seeks the solution. It is also possible to choose the nlminb algorithm. In that case, boundaries for the coefficients can be set by the options upper= and lower=.
The constrOptim is only available for nonlinear models for now. The standard errors may have to be corrected if the estimtes reach the boundary set by ui and ci
  
所以你看你的条件是不是满足,或者换成optimize试一试
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

扫码加好友,拉您进群
各岗位、行业、专业交流群