请选择 进入手机版 | 继续访问电脑版
楼主: a362900304
6161 3

应用sas绘制时序图时,碰到了时间程序不知道怎么写? [推广有奖]

  • 0关注
  • 0粉丝

初中生

14%

还不是VIP/贵宾

-

威望
0
论坛币
1 个
通用积分
0
学术水平
0 点
热心指数
0 点
信用等级
0 点
经验
185 点
帖子
10
精华
0
在线时间
2 小时
注册时间
2011-9-23
最后登录
2013-5-12

a362900304 发表于 2012-2-25 20:57:46 |显示全部楼层 |坛友微信交流群

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

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

经管之家联合CDA

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

感谢您参与论坛问题回答

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

+2 论坛币
具体的形式是
月份         2000年   2001年   2002年    2003年
1
2
3
4
5
6
7
8
9
10
11
12
中间是数据,我编程时在time=intnx('monrh','01jan2000'd, _n_-1);这个地方不知道怎么改,才能够包括2001年、2002年、2003年的内容呢?求指教谢谢!
二维码

扫码加我 拉你入群

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

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

关键词:不知道 时序图 time 求指教 Tim 程序

bakoll 发表于 2015-4-8 13:39:17 |显示全部楼层 |坛友微信交流群
The form of the INTNX function is

INTNX ( interval, from, n < , alignment > ) ;
The arguments to the INTNX function are as follows:

interval
is a character constant or variable that contains an interval name

from
is a SAS date value (for date intervals) or datetime value (for datetime intervals)

n
is the number of intervals to increment from the interval that contains the from value

alignment
controls the alignment of SAS dates, within the interval, used to identify output observations. Allowed values are BEGINNING, MIDDLE, END, and SAMEDAY.

The number of intervals to increment, n, can be positive, negative, or zero.

For example, the statement NEXTMON=INTNX(’MONTH’,DATE,1) assigns to the variable NEXTMON the date of the first day of the month following the month that contains the value of DATE. Thus INTNX(’MONTH’,’21OCT2007’D,1) returns the date 1 November 2007.
已有 1 人评分论坛币 收起 理由
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20   查看全部评分

使用道具

天穹下 发表于 2015-4-8 15:25:21 |显示全部楼层 |坛友微信交流群

data m;
input month y2000 y2001 y2002 y2003;
CARds;
1 19 19 19 19
2 90 90 90 90
3 10 10 10 10
4 25 25 25 25
5 19 19 19 19
6 90 90 90 90
7 10 10 10 10
8 25 25 25 25
9 19 19 19 19
10 90 90 90 90
11 10 10 10 10
12 25 25 25 25
;
proc transpose data=m out=m name=year prefix=data;
by month;
var y2000-y2003;
run;
proc sort data=m;
by year;
run;
data m;
set m(keep=data1);
time=intnx('month','01jan2000'd,_n_-1);
format time yymon7.;
run;
proc gplot data=m;
plot data1*time;
symbol i=join;
run;
已有 1 人评分论坛币 收起 理由
admin_kefu + 20 热心帮助其他会员

总评分: 论坛币 + 20   查看全部评分

使用道具

天穹下 发表于 2015-4-8 15:35:35 |显示全部楼层 |坛友微信交流群
/*接上(1)绘制该序列时序图ji样本自相关图
(2)判断该序列的平稳性
(3)判断该序列的纯随机性*/
proc arima data=m;
identify var=data1 stationarity= (adf=1);/*3个要求都在里面了*/
run;

使用道具

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

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-4-18 08:32