全部版块 我的主页
论坛 数据科学与人工智能 数据分析与数据科学 MATLAB等数学软件专版
16921 72
2011-08-23
有大牛可以请教一下如何使用GMM library Matlab么?
已经使用了Norman Gaussian Estimation using MLE
希望能再用GMM做calibration 得到参数后做simulation对比how well it fit historical data compared to MLE.
已经下了GMM library matlab, 但不知如何使用, 望指教!!
QQ 86504728
隐身等待大牛出现
keep hoping :)
二维码

扫码加我 拉你入群

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

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

全部回复
2011-8-25 15:46:54
gmm_with_R.pdf
  http://cran.r-project.org/web/packages/gmm/vignettes/gmm_with_R.pdf
3.1. Estimating the parameters of a normal distribution
# Implementing the 3 moment conditions
g <- function(tet, x)
{
m1 <- (tet[1] - x)
m2 <- (tet[2]^2 - (x - tet[1])^2)
m3 <- x^3 - tet[1]*(tet[1]^2 + 3*tet[2]^2)
f <- cbind(m1, m2, m3)
return(f)
}
# Implementing the jacobian
Dg <- function(tet, x)
{
jacobian <- matrix(c( 1, 2*(-tet[1]+mean(x)), -3*tet[1]^2-3*tet[2]^2,0, 2*tet[2],-6*return(jacobian)
}
# Now we want to estimate the two parameters using the GMM.
gmm(g, x, c(0, 0), grad = Dg)

感觉跟楼主要做的很像.

先供楼主参考.


二维码

扫码加我 拉你入群

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

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

2011-8-25 16:48:05
experiment     t.dat;                    % load data on votes
hessz          : Calculate/update Inverse Hessian
lsfunc         : Evaluate least squares function m(b)'Wm(b) at b
lsgrad         : Evaluate M(b)'Wm(b) Gradient of objective function
minz           : minimize general function.  Special applications
nllsrho_minz   e of moment conditions
nllsrho_minz2  e to Calculate Spatial error parameter
numz           : Evaluate numerical derivs in MINZ package
prt_gmm        : Prints output of sem_gmm, sar_gmm, sac_gmm
sac_gmm        : computes Generalized Moments Estimates for general spatial model
sac_gmmd       : An example of using sac_gmm
sac_gmmd2      : An example of using sac_gmm on a large data set   
sar_gmm        : computes Generalized Moments Estimates for Spatial Autoregressive Model
sar_gmmd       : An example of using sar_gmm
sar_gmmd2      : An example of using sar_gmm on a large data set   
sar_gmmd3      : An example of using sar_gmm on a simulated large data set   
sar_gmmd4      : An example of using sar_gmm on a simulated large data set   
sar_gmmd5      : An example of using sar_gmm on a simulated large data set   
sem2_gmm       : computes Method of Moments Estimates for Spatial Error Model
sem2_gmmd      : An example of using sem2_gmm
sem_gmm        : computes GMM Estimates for Spatial Error Model
sem_gmmd       : An example of using sem_gmm
sem_gmmd2      : An example of using sem_gmm,sem2_gmm on a large data set   
sem_gmmd3      : A Monte Carlo comparison of sem_gmm and ML sem
sem_gmmd4      : A Monte Carlo example of using sem_gmm
sem_mcarlo     : A Monte Carlo comparison of GMM sem and ML sem
sem_monte1     : A DEMO FILE CONTAINS A MONTE CARLO SIMULATION for sem_gmm
sem_monte2     : A DEMO FILE CONTAINS A MONTE CARLO SIMULATION for sem2_gmm
step2          : Determine step size in NUMZ package
二维码

扫码加我 拉你入群

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

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

2011-8-25 16:50:03
pls see D:\...\jplv7\spatial\gmm_models in detail
Hope you can give the detail model.Is spatial econometric or ..?
二维码

扫码加我 拉你入群

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

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

2011-8-31 06:05:37
ywh19860616 发表于 2011-8-25 16:50
pls see D:\...\jplv7\spatial\gmm_models in detail
Hope you can give the detail model.Is spatial eco ...
Hey, thxs for replying:)

I am doing a interest rate model: the CKLS model right now. It nests a range of different one-factor models. I figured out how to do it with GMM now, thanking to your advice.
But a new problem occurs, which bothers me pretty much... I want to do t-test, chi-square test and get p- value by setting 95% confidence level.  But i get stuck on these problems. Do u have any suggestions?

Thxs again
二维码

扫码加我 拉你入群

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

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

2011-8-31 06:06:39
epoh 发表于 2011-8-25 15:46
gmm_with_R.pdf
  http://cran.r-project.org/web/packages/gmm/vignettes/gmm_with_R.pdf
3.1. Estimati ...
Thanks for ur help :))
二维码

扫码加我 拉你入群

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

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

点击查看更多内容…
相关推荐
栏目导航
热门文章
推荐文章

说点什么

分享

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