楼主: sontiq
8346 2

可以用EVIEWS的Quick generate series一次性创建多个序列吗? [推广有奖]

  • 0关注
  • 0粉丝

本科生

6%

还不是VIP/贵宾

-

威望
0
论坛币
0 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
708 点
帖子
59
精华
0
在线时间
13 小时
注册时间
2007-4-13
最后登录
2016-2-15

楼主
sontiq 发表于 2009-5-26 17:25:00 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
可以用EVIEWS的Quick generate series一次性创建多个序列吗?
二维码

扫码加我 拉你入群

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

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

关键词:generate Series EVIEWS Views Eview EVIEWS 序列 Series Quick generate

回帖推荐

sontiq 发表于3楼  查看完整内容

xiexie我找到解决办法了。用命令行生成如series a=(b=1)

carl1234567890 发表于2楼  查看完整内容

我查询了EViews 6的帮助手册,在输入方程后,可以产生一个唯一的序列。不知楼主是何需求?Series One of the primary uses of expressions is to generate new series from existing data or to modify the values in an existing series. Used in combination with samples, expressions allow you to perform sophisticated transformations of your data, saving the results in new or existing series objects. The current d ...

本帖被以下文库推荐

沙发
carl1234567890 发表于 2009-5-27 13:00:00

我查询了EViews 6的帮助手册,在输入方程后,可以产生一个唯一的序列。

不知楼主是何需求?

Series

One of the primary uses of expressions is to generate new series from existing data or to modify the values in an existing series. Used in combination with samples, expressions allow you to perform sophisticated transformations of your data, saving the results in new or existing series objects.

The current discussion focuses on the basic numeric series object. Users who wish to work with alphanumeric or advanced series features should see "Working with Data (Advanced)" and "Series Links".

To create or modify a series, select Quick/Generate Series... or click on the Genr button on the workfile toolbar. EViews opens a window prompting you for additional information.

You should enter the assignment statement in the upper edit box, and the relevant sample period in the lower edit box.

The assignment statement is actually an implicit loop over observations. Beginning with the first observation in the sample, EViews will evaluate the assignment statement for each included observation.

Basic Assignment

You can type the series name, followed by an equal sign and then an expression. For every element of the sample, EViews will evaluate the expression on the right-hand side of the equality, and assign the value to the destination series on the left-hand side, creating the series if necessary.

For example, if there is no series named Y,

y = 2*x + 37*z

will first create the Y series and fill it with NAs. Then, for every observation in the current sample, EViews will fill each element of the Y series with the value of the expression. If Y does exist, EViews will only replace Y values in the current sample with the value of the expression. All observations not in the sample will be unchanged.

One special form of assignment occurs when the right-hand side of the assignment statement is a constant expression:

y = 3

y = 37 * 2 + 3

EViews will simply assign the value of the constant to all of the observations in the sample.

Using Samples

By modifying the sample of observations used in assignment, you can splice together series using multiple Genr commands. For example, if we enter three Genr commands with different samples: first

Upper window: y = z

Lower window: @all if z<=1 and z>-1

followed by a Genr with,

Upper window: y = -2 + 3*z

Lower window: if z>1

and finally,

Upper window: y = -.9 + .1*z

Lower window: if z<=-1

we can generate Y as a piecewise linear function of the series Z. Note that the "@ALL" is implicit in the latter two assignments.

While it is possible to perform these types of operations using loops and IF-statements"EViews Programming", we strongly urge you to use Genr and sample statements where possible, since the latter approach is much more efficient.

Dynamic Assignment

Since EViews evaluates the assignment expression for each observation in the sample, you can perform dynamic assignment by using lagged values of the destination series on the right side of the equality. For example, suppose we have an annual workfile that ranges from 1945 to 1997. Then if we enter:

Upper window: y = y + y(-1)

Lower window: 1946 1997

EViews will replace the Y series with the cumulative sum of Y. We begin with 1946, since we do not want to transform the first value in the workfile. Then for each period, EViews will take the current value of Y and add it to the lagged value of Y. The assignment is dynamic because as we successively move on to the next period, the lagged value of Y contains the cumulative sum.

Note that this procedure destroys the original data. To create a new series with the cumulative sums, you will have to perform the assignment in two steps, first making a copy of the original series, and then performing the dynamic assignment.

Implicit Assignment

You can make an implicit assignment by putting a simple formula on the left-hand side of the equal sign. EViews will examine your expression and select, as the destination series, the first valid series name on the left-hand side of the equality. Then for every observation in the sample, EViews will assign values using the implicit relationship. For example, if you enter:

log(y) = x

EViews will treat Y as the destination series, and evaluate y=exp(x) for every observation in the sample.

The following are examples of valid assignment statements where Y is the destination series:

1/y = z

log(y/x)/14.14 = z

log(@inv(y)*x) = z

2+y+3*z = 4*w

d(y) = nrnd

In general, EViews can solve for, or normalize, equations that use the following on the left-hand side of the equality: +, -, *, /, ^, log(), exp(), sqr(), d(), dlog(), @inv().

Since Genr is not a general equation solver, there will be situations in which EViews cannot normalize your equation. You cannot, for example, use the assignment statement:

@tdist(y, 3) = x

since @tdist is not one of the functions that EViews knows how to invert. Similarly, EViews cannot solve for equations where the destination series appears more than once on the left side of the equality. For example, EViews cannot solve the equation:

x + 1/x = 5

In both cases, EViews will display the error message "Unable to normalize equation".

Note that the destination series can appear on both sides of the equality. For example:

log(x) = x

is a legal assignment statement. EViews will normalize the expression and perform the assignment

x = exp(x)

so that X will be assigned the exponential of the original value of X. EViews will not solve for the values of X satisfying the equality "LOG(X) = X".

Using the Command Window

You can create series and assign values from the command window. First, set the workfile sample using the smpl statement, then enter the assignment statement.

There are alternative forms for the assignment statement. First, if the series does not exist, you must use either the series or the genr keyword, followed by the assignment expression. The two statements:

series y = exp(x)

genr y = exp(x)

are equivalent methods of generating the series Y. Once the series has been created, subsequent assignment statements do not require the series or the genr keyword:

smpl @all

series y = exp(x)

smpl 1950 1990 if y>300

y = y/2

This set of commands first sets the series to equal EXP(X) for all observations, then assigns the values Y/2 for the subset of observations from 1950 to 1990 if Y>300.

<script language="JavaScript1.2" type="text/javascript"></script>
已有 1 人评分经验 论坛币 收起 理由
胖胖小龟宝 + 10 + 10 热心帮助其他会员

总评分: 经验 + 10  论坛币 + 10   查看全部评分

藤椅
sontiq 发表于 2009-5-29 15:20:00

xiexie我找到解决办法了。

用命令行生成

series a=(b=1)

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

本版微信群
加好友,备注jltj
拉您入交流群
GMT+8, 2025-12-25 10:47