BookmarkSubscribeRSS Feed
srikanthyadav44
Quartz | Level 8

dear all

I have the time series data in the following format. 

DateY1Y2Y3…………….Y100BSE_500_returnDJI_return
3-Jan-130.57-0.330.88 0.760.34-0.16
4-Jan-13-0.33-0.62-0.07 1.580.170.33
7-Jan-13-1.042.3-1.26 -1.6-0.21-0.38
8-Jan-13-0.24-1.82-0.61 -0.070.11-0.41
9-Jan-13-1.23-1.63-2.45 -0.06-0.420.46
10-Jan-13-1.330.33-2.54 -0.46-0.160.60
11-Jan-13-1.34-2.98-2.94 -2.28-0.630.13
14-Jan-130.133.032.2 -2.41.220.14
15-Jan-131.830.43.83 0.670.380.20
16-Jan-13-0.1-0.62-0.18 -3.73-1.02-0.17
17-Jan-13-1.79-1.071.06 -1.190.560.63
18-Jan-13-1.19-1.08-0.78 1.160.200.39
21-Jan-13-0.722.110.78 2.280.27 
22-Jan-131.86-0.07-0.8 0.81-0.700.46
23-Jan-13-0.57-1.33-0.51 0.24-0.200.49
24-Jan-13-0.44-2.99-0.13 -1.63-1.100.33
25-Jan-13-1.150.771.02 0.251.130.51
28-Jan-13-0.184.86-0.88 -2.370.07-0.10
29-Jan-13-1.76.46-0.13 -0.57-0.530.52
30-Jan-131.52-2.371.75 1.170.08-0.32

 

I have to regression Y1  to Y100 on BSE_500_return and DJI_return and save the predicted values and residuals for each dependent varaible from Y1 to Y 100 on every date in the data set. 

 

please suggest me appropriate SAS code to do it. 

thanks in advance. 

 

4 REPLIES 4
Reeza
Super User

What type of regression are you planning to do?

ARIMA? Linear Regression? Something else?

 

This is a list of the time series procedures (if you have SAS/ETS licensed). 

https://documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_intro_sect003.htm&docsetVersion=15....

 

You can check what you have licensed with:

proc product_status;run;

@srikanthyadav44 wrote:

dear all

I have the time series data in the following format. 

Date Y1 Y2 Y3 ……………. Y100 BSE_500_return DJI_return
3-Jan-13 0.57 -0.33 0.88   0.76 0.34 -0.16
4-Jan-13 -0.33 -0.62 -0.07   1.58 0.17 0.33
7-Jan-13 -1.04 2.3 -1.26   -1.6 -0.21 -0.38
8-Jan-13 -0.24 -1.82 -0.61   -0.07 0.11 -0.41
9-Jan-13 -1.23 -1.63 -2.45   -0.06 -0.42 0.46
10-Jan-13 -1.33 0.33 -2.54   -0.46 -0.16 0.60
11-Jan-13 -1.34 -2.98 -2.94   -2.28 -0.63 0.13
14-Jan-13 0.13 3.03 2.2   -2.4 1.22 0.14
15-Jan-13 1.83 0.4 3.83   0.67 0.38 0.20
16-Jan-13 -0.1 -0.62 -0.18   -3.73 -1.02 -0.17
17-Jan-13 -1.79 -1.07 1.06   -1.19 0.56 0.63
18-Jan-13 -1.19 -1.08 -0.78   1.16 0.20 0.39
21-Jan-13 -0.72 2.11 0.78   2.28 0.27  
22-Jan-13 1.86 -0.07 -0.8   0.81 -0.70 0.46
23-Jan-13 -0.57 -1.33 -0.51   0.24 -0.20 0.49
24-Jan-13 -0.44 -2.99 -0.13   -1.63 -1.10 0.33
25-Jan-13 -1.15 0.77 1.02   0.25 1.13 0.51
28-Jan-13 -0.18 4.86 -0.88   -2.37 0.07 -0.10
29-Jan-13 -1.7 6.46 -0.13   -0.57 -0.53 0.52
30-Jan-13 1.52 -2.37 1.75   1.17 0.08 -0.32

 

I have to regression Y1  to Y100 on BSE_500_return and DJI_return and save the predicted values and residuals for each dependent varaible from Y1 to Y 100 on every date in the data set. 

 

please suggest me appropriate SAS code to do it. 

thanks in advance. 

 


 

srikanthyadav44
Quartz | Level 8
Dear Reeza
I want to use simple Linear Regression only.
please suggest the SAS code for saving the predicted values from the regression
Reeza
Super User
proc reg data=sashelp.baseball;
   id name team league;
   model logSalary = nhits nruns nrbi nbb yrmajor crhits;
 output out=want p=predicted;
run;

Predicted values are in the WANT data set. The code should run on your computer for you to test it. 

 


@srikanthyadav44 wrote:
Dear Reeza
I want to use simple Linear Regression only.
please suggest the SAS code for saving the predicted values from the regression

 

ballardw
Super User

Can you show the code you expect to use for ONE of the variables?

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 478 views
  • 0 likes
  • 3 in conversation