楼主: tulipsliu
1981 8

[程序分享] [Spatial Econometrics] 空间计量工具箱分享 [推广有奖]

经济学论述自由撰稿人!

已卖:2752份资源

学科带头人

45%

还不是VIP/贵宾

-

威望
0
论坛币
386045 个
通用积分
527.0498
学术水平
127 点
热心指数
140 点
信用等级
103 点
经验
46986 点
帖子
1773
精华
0
在线时间
2509 小时
注册时间
2007-11-5
最后登录
2026-2-7

初级热心勋章

楼主
tulipsliu 在职认证  发表于 2021-7-1 18:22:56 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
/ ********************************************

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright (c) R. Kelley Pace
Louisiana State University
Baton Rouge, Louisiana, U.S.A.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Master James P. LeSage .  

<Applied Econometrics using MATLAB>

James P. LeSage

Department of Economics
University of Toledo
October, 1999
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Author:      Daniel Tulpen Liu,
University:University of China.

Deutsh bitte.





/ ********************************************


Keywords: MATLAB, Spatial Econometrics ,FORTRAN ,C++

这个工具箱,是与我师从的著名空间计量经济学家, James P.LeSage 他老人家合作出版书籍,分别发布不同计量经济学程序的。

我很多年前发过 JPLV7 工具箱吧, 作者是 James P.LeSage 教授。过几天把关于 James 教授的程序,我发过的在论文的帖子链接补充在这个帖子里。今天分享的是和教授齐名,共同出版书籍的 Kelly Pace 教授的空间计量经济学程序。里面有 C++ 代码,已经在我的MATLAB 里通过 mex 命令编译过,不需要再编译,可以直接使用程序。

但是,Pace 教授的 FORTRAN 程序我能编译大部分,有一个程序没编译,FORTRAN 代码的 mex 文件,后缀名是 .mexw64 文件。不过我测试过,不影响工具箱的使用。
整体而言,不论是 C++ 生成 .mexw64 文件还是绝大部分FORTRAN 高级程序语言生成 .mexw64 文件,都比较顺利。
参考书籍是  James 教授和 Kelly 教授共同写的,解压文件后,在这个文件夹里。 Bibliography

工具箱下载链接在这里:

SpatialToolbox2.zip (15.86 MB, 需要: 1 个论坛币)
======================== Enjoy ==============================


分享者: 一个特别爱计量经济学的程序员。  
二维码

扫码加我 拉你入群

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

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

关键词:econometrics Econometric Spatial metrics Metric

劳动经济学

沙发
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-3 08:46:51
  Generalised Impulse Response Functions
_Ken Nyholm, 22 March 2016_

  

Generalised impulse response functions (GIRFs) are calculated from the
moving average representation of the VAR model, as the difference between the
a conditional and unconditional forecast, where the conditioning information
set is the shock to the j'th variable (koop et al (1996)).

Let $D_{t-1}$ represent the data available at time $t-1$, let $h=\{1,2,\ldots\}$
be the forecast horizon, let $i=\{1,2,\ldots,i_N\}$ count the variables in included
in the VAR model, which are collected in $Z$, such that $Z^i$ refers to the
i'th variable, and denote by $\delta_j$ the shock to the j'th variable in the
VAR, where $j=\{1,2,\ldots,j_N\}$, with $i_N=j_N$.

The GIRF is then defined in the following way:

$$GIRF(i,t+h,\delta_{j,t},D_{t-1}) = E\left(Z^i_{t+h} \vert u_{j,t}=\delta_{j,t},
D_{t-1} \right) - E\left(Z^j_{t+h} \vert D_{t-1} \right)$$

for the VAR model:

$$Z_t = k + F \cdot Z_{t-1} + u_t, $$    $$u \sim N(0,\Upsilon)$$

Following Peseran and Shin (1998) the orthogonalised and generalised IRFs
can be calculated in the following way, respectively, for a shock to the j'th
equation:

$$\psi^o_j(h)=A_hPe_j,$$   $$n=0,1,2,\ldots$$

$$\psi^g_j(h)=\upsilon_{(j,j)}^{-\frac{1}{2}} \; A_h \, \Upsilon \, e_j$$   
$$n=0,1,2,\ldots$$

where $A_h$ is the h'th coefficient-matrix from the moveing average representation
of the VAR model, P is the lower-triangular Cholesky decomposition $\Upsilon$,
$e_j$ is a vector having unity at the j'th position and zeros elsewhere, and
$\upsilon_{(j,j)}$ is the (j,j) element of $\Upsilon$.

The VAR model is written here as a VAR(1) model without loss of generality
due to the companion form.

藤椅
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-5 20:15:33
$$\begin{array}{ll}
\underset{\boldsymbol{\Theta} \succ \mathbf{0}}{\textsf{maximize}} & \log \det \boldsymbol{\Theta}
- \mathrm{tr}(\mathbf{S}\boldsymbol{\Theta}) - \alpha \Vert \boldsymbol{\Theta}\Vert_{1, \text{off}},
\end{array} $$

板凳
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-5 20:16:32
$$
\begin{array}{ll}
&\underset{\boldsymbol{\Theta}}{\textsf{maximize}} & \log \mathrm{gdet} \boldsymbol{\Theta}
- \mathrm{tr}(\mathbf{S}\boldsymbol{\Theta}) - \alpha \Vert \boldsymbol{\Theta}\Vert_{1, \text{off}},\\
&\textsf{subject to} & \boldsymbol{\Theta} \in \mathcal{S}_{\mathcal{L}},
\end{array}
$$

报纸
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-5 20:27:45
$$
\begin{array}{ll}
\underset{{\mathbf{w}},{\boldsymbol{\psi}},{\mathbf{V}}}{\textsf{minimize}} &
\begin{array}{c}
- \log \det (\mathcal{L} \mathbf{w}+\frac{1}{p}\mathbf{11}^{T})+\text{tr}({\mathbf{S}\mathcal{L} \mathbf{w}})+
  \alpha \Vert\mathcal{L}\mathbf{w}\Vert_{1}+
  \frac{\gamma}{2}\Vert \mathcal{A} \mathbf{w}-\mathbf{V} {\sf Diag}(\boldsymbol{\psi}) \mathbf{V}^T \Vert_F^2,
\end{array}\\
\text{subject to} & \begin{array}[t]{l}
\mathbf{w} \geq 0, \ \boldsymbol{\psi} \in \mathcal{S}_{\boldsymbol{\psi}}, \ \text{and} \ \mathbf{V}^T\mathbf{V}=\mathbf{I},
\end{array}
\end{array}$$

地板
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-9 21:30:33
$$
p(x) = \frac{\lambda^x e^{-\lambda}}{x!}}$$
$$
p(x) = \lambda^x exp(-\lambda)/x!
$$

7
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-10 09:49:14
This goodness-of fit test uses the information matrix equality of White (1982) and was investigated by Huang and Prokhorov (2011). The main contribution is that under correct model specification the Fisher Information can be equivalently calculated as minus the expected Hessian matrix or as the expected outer product of the score function. The null hypothesis is
$$
H_0: \boldsymbol{H}(θ) + \boldsymbol{C}(θ) = 0
$$
against the alternative
$$
H_0: \boldsymbol{H}(θ) + \boldsymbol{C}(θ) \neq 0 ,
$$

8
tulipsliu(未真实交易用户) 在职认证  发表于 2021-7-12 06:47:29
$$\hat \beta := \mathop{\arg \max}_{\beta\in\mathscr{B}} \left( \int \exp(-f(u,\beta,\theta)) \: du \right) $$

9
三重虫(未真实交易用户) 发表于 2021-9-21 13:46:49

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2026-2-7 20:19