楼主: liuxiaofengas
3183 1

[求助] 用Optim优化函数的问题! [推广有奖]

  • 0关注
  • 0粉丝

初中生

47%

还不是VIP/贵宾

-

威望
0
论坛币
68 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
76 点
帖子
2
精华
0
在线时间
26 小时
注册时间
2008-7-9
最后登录
2014-5-5

楼主
liuxiaofengas 发表于 2008-9-23 17:10:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币

各位高手帮帮小弟吧!

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

多谢多谢!

二维码

扫码加我 拉你入群

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

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

关键词:Optim OPT Tim GMM估计 不稳定 函数 Optim

沙发
DM小菜鸟 发表于 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试一试

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-20 20:49