全部版块 我的主页
论坛 计量经济学与统计论坛 五区 计量经济学与统计软件 Gauss专版
3797 3
2009-11-20
recserar的问题,请举例谢谢啊
二维码

扫码加我 拉你入群

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

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

全部回复
2009-11-20 10:30:06
recserar

Purpose

Computes a vector of autoregressive recursive series.

Format

y = recserar(x,y0,a);

Input


x
NxK matrix

y0
PxK matrix.

a
PxK matrix.


Output


y
NxK matrix containing the series.


Remarks

recserar is particularly useful in dealing with time series.

Typically, the result would be thought of as K vectors of length N.

y0 contains the first P values of each of these vectors (thus, these are prespecified). The remaining elements are constructed by computing a Pth order “autoregressive” recursion, with weights given by a, and then by adding the result to the corresponding elements of x. That is, the tth row of y is given by:

  


and

  


Note that the first P rows of x are not used.

Example

n = 10;

fn multnorm(n,sigma) = rndn(n,rows(sigma))*chol(sigma);

let sig[2,2] = { 1 -.3, -.3 1 };

rho = 0.5~0.3;

y0 = 0~0;

e = multnorm(n,sig);

x = ones(n,1)~rndn(n,3);

b = 1|2|3|4;

y = recserar(x*b+e,y0,rho);

In this example, two autoregressive series are formed using simulated data. The general form of the series can be written:

y[1,t] = rho[1,1]*y[1,t-1] + x[t,.]*b + e[1,t]

y[2,t] = rho[2,1]*y[2,t-1] + x[t,.]*b + e[2,t]

The error terms (e[1,t] and e[2,t]) are not individually serially correlated, but they are contemporaneously correlated with each other. The variance-covariance matrix is sig.
二维码

扫码加我 拉你入群

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

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

2009-11-20 16:10:00
版主谢谢您啊
二维码

扫码加我 拉你入群

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

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

2012-5-9 23:34:22
xuelida 发表于 2009-11-20 10:30
recserar

Purpose
您好,请问要查找GAUSS中各种函数的使用,该怎么做啊,好像GAUSS中的help功能不够强大啊,这点和MATLAB以及STATA相比差多了。
二维码

扫码加我 拉你入群

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

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

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

说点什么

分享

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