Sorry, there should be about 30 days data, not 41 days.
Thanks
Hello,
I have a data set 41 days data.
There are 14 columns. And the first column is Date. Second column is Y and the rest are X's.
Sorry to ask something so basic, but are we able to run regression for each day at one time?
I have attached file.
Thank you for your time and effort.
Sorry, there should be about 30 days data, not 41 days.
Thanks
If the question is just that can you run a regression for each day then answer is yes. There are many different procedures for this depending on what kind of regression are you trying to run. Is it simple OLS or are you trying to run autoregressive models(arma/arima/garch). The second consideration is that do you have enough observations for each day?
Technically you can run any type of regression using SAS if you understand what you need. If you've already worked on some proc or code then do share it.
whsieh (02-19-2012)
The use of "by" statement must do it. I don't know what sort of model (simple regression or some time series modelling) you're trying to fit to the data but take simple linear regression as an example.
As jrai nicely summed up: "you can run any type of regression using SAS if you understand what you need".Code:proc reg data=nameofyourdata; model y = x1-x10; by date; run; *This should give you the results of regression model you've fitted at each dates separately;
PS: To be precise, the data have 29 days
Code:Class Levels Values date 29 1/10/11 1/11/11 1/12/11 1/3/11 1/4/11 1/5/11 1/6/11 1/7/11 12/10/10 12/13/10 12/14/10 12/15/10 12/16/10 12/17/10 12/2/10 12/20/10 12/21/10 12/22/10 12/23/10 12/27/10 12/28/10 12/29/10 12/3/10 12/30/10 12/31/10 12/6/10 12/7/10 12/8/10 12/9/10
Oh Thou Perelman! Poincare's was for you and Riemann's is for me.
whsieh (02-19-2012)
Hi guys,
Thank you for reply.
Yes, I meant run regression by date. And there are 416 observations for each date. Simple OLS is what I need.
Thank you
In that case a by statement should do it. Let me just warn you that when you want your results by variable, you must always sort the data by variables first. In any case, you would have figured out the need to sort (becuase I assume the SAS log should throw an error if you don't sort beforehand).
Code:*sort data by the variable you want your results by; proc sort data=nameofyourdata; by date; run; *Perform OLS; proc reg data=nameofyourdata; model y = x1-x12; by date; run;
Oh Thou Perelman! Poincare's was for you and Riemann's is for me.
whsieh (02-20-2012)
got it, thanks A lots!
|
|