SAS中文论坛

 找回密码
 立即注册

扫一扫,访问微社区

查看: 644|回复: 1
打印 上一主题 下一主题

How to Transform Forecast from Log Value Using SAS?

[复制链接]

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
楼主
 楼主| 发表于 2009-9-21 08:45:09 | 只看该作者

How to Transform Forecast from Log Value Using SAS?

Dear Lister

I got forecasts in form of log after I run the following programm and could tranform the log value back into what I really need using Excel Exp function. Anyway, Could you please advise how to program in SAS to get what I need directly?

Thanks in advance!
=================


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 ;
data Forks;
      set Forks;
      ltraffic = log( traffic );
   run;

proc ucm data = Forks;
id month interval=month;
model Ltraffic ;
irregular;
level ;
cycle print=smooth;
estimate;
deplag lags=2;
forecast lead=12 print=decomp;
run ;
回复 支持 反对

使用道具 举报

49

主题

76

帖子

1462

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
1462
沙发
 楼主| 发表于 2009-9-21 09:26:45 | 只看该作者

Re: How to Transform Forecast from Log Value Using SAS?

SAS 里做指数变换的函数写法跟excel一样的,都是exp(); 另外以后问问题用中文问,这里是SAS[b:7cy9rh39][size=150:7cy9rh39][color=#0000BF:7cy9rh39][u:7cy9rh39]中文[/u:7cy9rh39][/color:7cy9rh39][/size:7cy9rh39][/b:7cy9rh39]论坛
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2026-2-6 00:58 , Processed in 0.067282 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

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