solarflare Tracker
https://communities.sas.com/kntur85557/tracker
solarflare TrackerFri, 19 Apr 2024 03:19:39 GMT2024-04-19T03:19:39ZRe: time series
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/time-series/m-p/668835#M3898
<P>The P=1 for the seasonal part of the model means that the current observation is correlated with themselves at lag = number of periods in the season.</P>
<P> </P>
<P>For example, if you are using monthly data then the current observation is correlated to itself at lag = 12.</P>
<P>Likewise, if you are using quarterly data, then the auto-correlation would be at lag = 4.</P>Mon, 13 Jul 2020 13:49:34 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/time-series/m-p/668835#M3898solarflare2020-07-13T13:49:34ZRe: Visual Forecasting Events
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Visual-Forecasting-Events/m-p/666093#M3874
<P>hmm, let me investigate a little more first. I'm less familiar with changes in events between 8.4 and 8.5.</P>Tue, 30 Jun 2020 14:24:25 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Visual-Forecasting-Events/m-p/666093#M3874solarflare2020-06-30T14:24:25ZRe: Visual Forecasting Events
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Visual-Forecasting-Events/m-p/666086#M3872
<P>Hi Ghabek,</P>
<P>I noticed your covid.sas file is missing a semicolon on the last line.</P>
<P>Try fixing that and rerunning it. I was able to create the event table on VF 8.5 after that.</P>Tue, 30 Jun 2020 14:17:25 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Visual-Forecasting-Events/m-p/666086#M3872solarflare2020-06-30T14:17:25ZRe: Question on interaction terms in a time series regression
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Question-on-interaction-terms-in-a-time-series-regression/m-p/654627#M3855
<P>There are no coefficients displayed, so that's probably what seems strange.</P>
<P>I was copying the original posters format and excluded them. </P>
<P> </P>
<P>The full model equation would be</P>
<P>log(y) = B0 + B1*log(r) + B2*log(m) + B3*log(r*m)</P>
<P> </P>
<P>Then you have to fit the model and perform statistical tests on the coefficients to see if they are statistically different from zero and should be included in the final model.</P>
<P> </P>
<P>Maybe it is not correct to use the logarithm property as I did, but it seems mathematically ok.</P>
<P>It does remove the interaction term and I'm not completely sure that can be compensated for in the coefficients.</P>
<P> </P>
<P> </P>
<P> </P>Mon, 08 Jun 2020 17:36:55 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Question-on-interaction-terms-in-a-time-series-regression/m-p/654627#M3855solarflare2020-06-08T17:36:55ZRe: Question on interaction terms in a time series regression
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Question-on-interaction-terms-in-a-time-series-regression/m-p/653797#M3852
<P>Hi,</P>
<P>I think it's best to return to the original model equation and consider the effect and the transforms. </P>
<P> </P>
<P>Before applying log and difference transformations, you have</P>
<P> y = r + m</P>
<P>If you add a <FONT color="#FF9900">multiplicative interaction term</FONT> then you have</P>
<P> y= r+m+<FONT color="#FF9900">(r*m)</FONT></P>
<P>now you can apply the log transform</P>
<P> log(y) = log(r) + log(m) + log<FONT color="#FF9900">(r*m)</FONT> </P>
<P>and properties of logarithms can reduce this further:</P>
<P> log(y) = log(r) + log(m) + log(r) + log(m)</P>
<P> log(y) = 2*log(r) + 2*log(m)</P>Fri, 05 Jun 2020 20:30:06 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Question-on-interaction-terms-in-a-time-series-regression/m-p/653797#M3852solarflare2020-06-05T20:30:06ZRe: SAS Visual Analytics - Forecasting
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Visual-Analytics-Forecasting/m-p/612698#M3687
<P>Hi Andreas,</P>
<P> </P>
<P>Scenario analysis is not yet available in the Visual Forecasting application.</P>
<P> </P>
<P>~Steven</P>Wed, 18 Dec 2019 14:52:45 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/SAS-Visual-Analytics-Forecasting/m-p/612698#M3687solarflare2019-12-18T14:52:45ZRe: Handling Time Variable in Time Series Modeling
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Handling-Time-Variable-in-Time-Series-Modeling/m-p/423182#M2919
<P>The best way would be to create a date variable to use for the time axis. You will need rows for the Saturday and Sunday dates with missing values for the target variable. </P>
<P> </P>
<P>Then you can include weekly differencing in estimate statements for fitting the model. The following will evaluate daily differences and weekly.</P>
<P> </P>
<PRE class="xis-codeBlock">identify var=target;
estimate p=(1 7);</PRE>
<P>In the forecasting stage, you can use the ID and INTERVAL options to specify it is daily data.</P>
<P> </P>
<P>The ID and INTERVAL can be specified in the FORECAST statement, for example,</P>
<P> </P>
<PRE class="sascode">forecast id=date interval=day;</PRE>
<P> </P>
<P>You shouldn't need a dummy variable for weekday after doing this, at least in PROC ARIMA. It should see if weekly differencing helps with the model based on the INTERVAL=DAY option.</P>
<P> </P>
<P>You can also find more information here:</P>
<P><A href="http://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=etsug&docsetTarget=etsug_arima_syntax11.htm&locale=en" target="_self">PROC ARIMA documentation</A></P>
<P> </P>
<P> </P>
<P>PROC ESM can be approached similarly, except the ID variable is specified in its own statement, for example:</P>
<P> </P>
<PRE class="xis-codeBlock">proc esm data=<input-data-set> out=<output-data-set>;
id <time-ID-variable> interval=<frequency>;
forecast <time-series-variables>;
run;</PRE>
<P> </P>
<P>Here is another link to the <A href="http://go.documentation.sas.com/?cdcId=pgmsascdc&cdcVersion=9.4_3.3&docsetId=etsug&docsetTarget=etsug_esm_gettingstarted.htm&locale=en" target="_self">PROC ESM documentation</A> </P>Thu, 21 Dec 2017 19:08:53 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Handling-Time-Variable-in-Time-Series-Modeling/m-p/423182#M2919solarflare2017-12-21T19:08:53ZRe: Hybrid model issue
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modelling-ARIMA-ANN/m-p/408882#M2755
<P>As mentioned above, neural networks are not supported in SAS University Edition. However, the general approach would be to model the data series with ARIMA for linear effects and then fit a neural network model to the residuals for non-linear effects. </P>
<P> </P>
<P>You can use University Edition for the ARIMA model, but you will either have to get access to a different version of SAS that includes neural networks or use a different programming environment for the second part.</P>Mon, 30 Oct 2017 19:43:04 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Modelling-ARIMA-ANN/m-p/408882#M2755solarflare2017-10-30T19:43:04ZRe: Procx12 question
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Procx12-question/m-p/408848#M2754
<P>I think the problem is that your input is not in a SAS date format in which the numeric value represents the number of days since Jan 1, 1960. So each successive year is being interpreted as the next day rather than the next year. </P>
<P> </P>
<P>To input the data correctly you need to use an informat.</P>
<P> </P>
<P>Try using <STRONG>date = mdy (1,1,year);</STRONG> in your data step instead of <STRONG>date = year;</STRONG></P>
<P> </P>
<P><STRONG>EDIT: </STRONG>In addition, to have the date display correctly, you will want to change your format statement to the following:</P>
<P> </P>
<PRE>format date year4.;</PRE>Mon, 30 Oct 2017 19:17:24 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Procx12-question/m-p/408848#M2754solarflare2017-10-30T19:17:24ZRe: Procx12 question
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Procx12-question/m-p/408828#M2752
<P>Hello,</P>
<P>To clarify, are your date variable values before formatting are something like 01JAN1999, 01JAN2000, 01JAN2001, ... ?</P>
<P> </P>
<P>In other words, does the date variable contain month and day information that is consistent and the interval of that data is one year? If you have monthly data then it would need to be accumulated yearly first using proc timedata.</P>
<P> </P>
<P>A sample of the data before formatting would be helpful</P>Mon, 30 Oct 2017 18:31:23 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/Procx12-question/m-p/408828#M2752solarflare2017-10-30T18:31:23ZHierarchical Forecasting with SASĀ® Visual Forecasting
https://communities.sas.com/t5/SAS-Communities-Library/Hierarchical-Forecasting-with-SAS-Visual-Forecasting/ta-p/400338
<P><SPAN>This article demonstrates how to generate hierarchical forecasts by reconciling statistical forecasts of multiple time series arranged by time series attributes.</SPAN></P>Wed, 04 Oct 2017 12:19:26 GMThttps://communities.sas.com/t5/SAS-Communities-Library/Hierarchical-Forecasting-with-SAS-Visual-Forecasting/ta-p/400338solarflare2017-10-04T12:19:26ZRe: 3 reasons why you should write an article for the SAS Communities Library
https://communities.sas.com/t5/Community-Memo/3-reasons-why-you-should-write-an-article-for-the-SAS/bc-p/400459#M172
<P>Is there any documentation on formatting options when writing a post with the editor, such as colors and styles for tables? Also, the editor seems to work pretty poorly. I don't see any of the options mentioned in the tool tip like the "clip area" or multiple editors for article sections. There is no editor scroll bar so I have to scroll all the way up the webpage after highlighting text to change the style and then scroll all the way back down to get back to where I was editing (I'm using Chrome).</P>
<P> </P>
<P>Is there a better way?</P>
<P>Thanks!</P>Mon, 02 Oct 2017 21:15:22 GMThttps://communities.sas.com/t5/Community-Memo/3-reasons-why-you-should-write-an-article-for-the-SAS/bc-p/400459#M172solarflare2017-10-02T21:15:22ZRe: QLIM Tobit Model and Prediction
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373440#M2480
<P>Hi Altijani,</P>
<P>I think I have it figured out now. The key is that the model parameter generation will only consider observations with all of the required variables, so any rows that have a missing value of Y will not be used to estimate the model parameters. Knowing this, we make a copy of the dataset, set the X2 values to zero and the Y values to missing and then append the copy to the original. Then we run PROC QLIM once and the correct model is applied to all of the data. </P>
<P> </P>
<P>After that a few data steps are used to split the data and reformat it into one table.</P>
<P> </P>
<P>See the code below. Let me know if you have questions. </P>
<PRE><CODE class=" language-sas">data test;
input Y_var X1 X2;
datalines;
0 2 0
59 7 0
0 19 0
25 3 1
0 8 1
;
run;
*create the mod data set with modified X2 values and missing Y values;
data test_mod;
set test;
Y_var=.;
X2=0;
run;
*append the mod data set to the original;
data test_mod;
set test test_mod;
run;
proc print data=test_mod;
title 'Input Data Set';
run;
proc qlim data=test_mod;
model Y_var = X1 X2;
endogenous Y_var ~censored(lb=0);
output out=qlim_out predicted;
title 'Proc qlim 1 results';
run;
proc print data=qlim_out;
title 'PROC QLIM Predicted Values';
run;
data original;
set qlim_out(obs=5);
run;
data modified;
set qlim_out(firstobs=6);
rename P_Y_var=P_Y_var_mod X2=X2_mod;
run;
data final;
merge original modified test;
run;
proc print data=final;
run;</CODE></PRE>Wed, 05 Jul 2017 20:32:51 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373440#M2480solarflare2017-07-05T20:32:51ZRe: QLIM Tobit Model and Prediction
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373325#M2478
<P>You're welcome.</P>
<P> </P>
<P>When I first read your post it seemed that you wanted to replace certain values of one of the variables and that line of code is setting the value for X2_mod to zero for the fourth observation. It can be replaced by any logic you would like to use to replace certain values of the new X2_mod variable. </P>
<P> </P>
<P>Although upon rereading the post it seems maybe you want to change all observations of the variable to zero. In that case you can replace that data step with this one.</P>
<PRE><CODE class=" language-sas">* create new data set with modified X2 variable;
data test_mod;
set test;
X2_mod = 0;
run; </CODE></PRE>Wed, 05 Jul 2017 15:05:39 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373325#M2478solarflare2017-07-05T15:05:39ZRe: QLIM Tobit Model and Prediction
https://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373305#M2476
<P>I think this will solve the problems you're encountering. </P>
<P>1. Adding the output statement to proc qlim will generate a dataset with the predicted values.</P>
<P>2. Creating a new variable with modified values for X2 allows rerunning the model and generating a new set of predicted variables</P>
<P> </P>
<P>See the sample code below. After running proc qlim twice and generating the output, I renamed the variable in the second output and merged them all into one data set.</P>
<PRE><CODE class=" language-sas">data test;
input Y_var X1 X2;
datalines;
0 2 0
59 7 0
0 19 0
25 3 1
0 8 1
;
run;
<BR />* create new data set with modified X2 variable;
data test_mod;
set test;
if _N_ = 4 then X2_mod = 0;
else X2_mod = X2;
run;
<BR />*run proc qlim for with X1 and X2, write output to test_out1;
proc qlim data=test_mod;
model Y_var = X1 X2;
endogenous Y_var ~censored(lb=0);
output out=test_out1 predicted;
run;
<BR />*run proc qlim with X1 and X2_mod, write output to test_out2;
proc qlim data=test_mod;
model Y_var = X1 X2_mod;
endogenous Y_var ~censored(lb=0);
output out=test_out2 predicted;
run;
<BR />*rename predicted variable in test_out_2;
data test_out2;
set test_out2;
rename P_Y_var=P_Y_var_mod;
run;
<BR />*combine data from test_mod, test_out1 and test_out2 into new data set named want;
data want;
merge test_mod test_out1 test_out2;
run;
<BR />*print new data set;
proc print data=want;
run;</CODE></PRE>
<P> </P>
<P>Best regards,</P>
<P>Steven</P>Wed, 05 Jul 2017 14:27:33 GMThttps://communities.sas.com/t5/SAS-Forecasting-and-Econometrics/QLIM-Tobit-Model-and-Prediction/m-p/373305#M2476solarflare2017-07-05T14:27:33Z