SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 857|回复: 5
打印 上一主题 下一主题

Re: Issue Regarding PROC UCM?

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2009-9-18 11:49:59 | 只看该作者

Re: Issue Regarding PROC UCM?

I have run the following code using SAS 9.1 UCM Procedure but got nothing except the attached log. Could you please advise how to fix my programmig? Any suggestion would be appreciated!

Have a nice day!

NewOccidental
========================
data Forks ;
      input Traffic @@ ;
      year = intnx('year','1July1998'd,_n_-1) ;
      format year year4. ;
      
      datalines ;
512120 539866 323879 206539 210805 224957 190984 206227 229770 283933 370180
428822 724675 531423 282590 251708 222655 234922 180316 225340 269849 298611
378608 383853 534533 506123 299371 221932 161498 194287 174983 164032 209285
255125 372356 396496 512111 404243 300123 221932 161498 195292 182974 171984
208714 238112 381171 382792 512021 506276 301072 224652 169112 196365 182625
168231 198217 266047 388689 390000 497327 462159 233866 212808 169622 186761
154902 168231 198217 217646 276887 291279 396841 333695 270000 190000 165727
189000 165507 197486 202832 239451 276877 373597 448032 376403 271026 190000
144866 205384 194931 171128 192235 249488 264218 343000 477603 404598 259858
174524 134870 210843 171098 165000 148000 244213 283214 355646 445758 406827
253933 183127 147000 207584 193000 205442 189860 233892 287263 342144 431370
374343 232542 176446 150000 183654 202700 195613 171542 218889 272513 300730
391720 335182
         ;
   run ;
proc ucm data = Forks;
      id year interval = Month;
      model Traffic ;
      irregular;
      level ;
      slope ;
      cycle ;
   run ;
=====================================================================
61   data Forks ;
62         input Traffic @@ ;
63         year = intnx('year','1July1998'd,_n_-1) ;
                               ------------
                               77
ERROR: Invalid date/time/datetime constant '1July1998'd.
ERROR 77-185: Invalid number conversion on '1July1998'd.
64         format year year4. ;
65
66         datalines ;
NOTE: The SAS System stopped processing this step because of errors.
WARNING: The data set WORK.FORKS may be incomplete.  When this step was stopped there were 0
         observations and 2 variables.
WARNING: Data set WORK.FORKS was not replaced because this step was stopped.
NOTE: DATA statement used (Total process time):
      real time           0.01 seconds
      cpu time            0.00 seconds
80            ;
81      run ;
82
83   proc ucm data = Forks;
84         id year interval = Month;
85         model Traffic ;
86         irregular;
87         level ;
88         slope ;
89         cycle ;
90      run ;
NOTE: No observations in data set WORK.FORKS.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE UCM used (Total process time):
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2009-9-18 12:13:58 | 只看该作者

Re: Issue Regarding PROC UCM?

There were 0 observations in your data set, so how did you get any result.

Note Log:
"ERROR: Invalid date/time/datetime constant '1July1998'd.
ERROR 77-185: Invalid number conversion on '1July1998'd.
"
correct this..
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
板凳
 楼主| 发表于 2009-9-18 12:26:31 | 只看该作者

Re: Issue Regarding PROC UCM?

I know I got nothing. Could you show me how to fix it? Thanks
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
地板
 楼主| 发表于 2009-9-18 12:44:08 | 只看该作者

Re: Issue Regarding PROC UCM?

data Forks ;
input Traffic @@ ;
year = intnx('year','1Jul1998'd,_n_-1) ;
format year yymmdd10. ;
datalines ;
512120 539866 323879 206539 210805 224957 190984 206227 229770 283933 370180
428822 724675 531423 282590 251708 222655 234922 180316 225340 269849 298611
378608 383853 534533 506123 299371 221932 161498 194287 174983 164032 209285
255125 372356 396496 512111 404243 300123 221932 161498 195292 182974 171984
208714 238112 381171 382792 512021 506276 301072 224652 169112 196365 182625
168231 198217 266047 388689 390000 497327 462159 233866 212808 169622 186761
154902 168231 198217 217646 276887 291279 396841 333695 270000 190000 165727
189000 165507 197486 202832 239451 276877 373597 448032 376403 271026 190000
144866 205384 194931 171128 192235 249488 264218 343000 477603 404598 259858
174524 134870 210843 171098 165000 148000 244213 283214 355646 445758 406827
253933 183127 147000 207584 193000 205442 189860 233892 287263 342144 431370
374343 232542 176446 150000 183654 202700 195613 171542 218889 272513 300730
391720 335182
;
run ;
proc ucm data = Forks;
id year interval=year;
model Traffic ;
irregular;
level ;
cycle ;
slope;
run ;
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
5#
 楼主| 发表于 2009-9-19 07:38:13 | 只看该作者

Re: Issue Regarding PROC UCM?

It works now. Thank you very much. My date start from July 1998 and ended on July 2009. Could you show me how to fix this issue? Thanks!
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
6#
 楼主| 发表于 2009-9-19 07:48:28 | 只看该作者

Re: Issue Regarding PROC UCM?

Dear Banzhu

This time the programming works. Thanks again!


Newoccidental
=========================
data Forks ;
input Traffic @@ ;
month = intnx('month','1Jul1998'd,_n_-1) ;
format month yymmdd10. ;
datalines ;
512120 539866 323879 206539 210805 224957 190984 206227 229770 283933 370180
428822 724675 531423 282590 251708 222655 234922 180316 225340 269849 298611
378608 383853 534533 506123 299371 221932 161498 194287 174983 164032 209285
255125 372356 396496 512111 404243 300123 221932 161498 195292 182974 171984
208714 238112 381171 382792 512021 506276 301072 224652 169112 196365 182625
168231 198217 266047 388689 390000 497327 462159 233866 212808 169622 186761
154902 168231 198217 217646 276887 291279 396841 333695 270000 190000 165727
189000 165507 197486 202832 239451 276877 373597 448032 376403 271026 190000
144866 205384 194931 171128 192235 249488 264218 343000 477603 404598 259858
174524 134870 210843 171098 165000 148000 244213 283214 355646 445758 406827
253933 183127 147000 207584 193000 205442 189860 233892 287263 342144 431370
374343 232542 176446 150000 183654 202700 195613 171542 218889 272513 300730
391720 335182
;
run ;
proc ucm data = Forks;
id month interval=month;
model Traffic ;
irregular;
level ;
cycle ;
slope;
run ;
回复 支持 反对

使用道具 举报

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

本版积分规则

QQ|小黑屋|手机版|Archiver|SAS中文论坛  

GMT+8, 2026-2-6 02:39 , Processed in 0.127254 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表