Forecasting using SAS Forecast Server, SAS/ETS, and more

how to model binary outcome with time series predictors

Accepted Solution Solved
Reply
Occasional Contributor A_S
Occasional Contributor
Posts: 12
Accepted Solution

how to model binary outcome with time series predictors

Dear SAS Communities,

 

I need to model a binary outcome (event = 1, nonevent = 0) with the independent variables being time series data (continuous). The dependent variable marks when event occured during a specific time period, and itself is a time series.

 

I would greatly appreciate guidance on which proceedures are applicable. The PROCs I tried thus far appear to model continuous outcomes.

 

Here are some more specific questions whose answer would help:

Is there a way to set PROC PANEL to a logit model (this power point says it is possible http://www.indiana.edu/~wim/docs/10_7_2011_slides.pdf)?

How do you set PROC NEURAL or HPNEURAL to run a recurrent neural network?

How do you use time series data in PROC LOGISTIC (my understanding is that LAG is for categorical variables)?

How do you set PROC VARMAX or SSM for binary outcomes?

 

Thank you!

acs


Accepted Solutions
Solution
‎08-09-2017 03:15 PM
SAS Super FREQ
Posts: 93

Re: how to model binary outcome with time series predictors

PROC NEURAL or HPNEURAL only support regular feed-forward neural net architectures, not recurrent neural net. You can mimic the time series effects by adding lagged dependent variable as inputs. This approach usually works pretty well for very short-term forecast as it is exactly how the model is trained. If multiple steps out forecast is required, you will run into issues with forecast errors propagating exponentially into the future steps because the forecasts has to be fed back into inputs for the lagged dependent variables to generate next step of forecast. The same issue applies to any non-time series models such as regression, logistic regression, decision tree, etc. It is less of an issue if you use lagged independent variables + all future values of independent variables are known.

 

I am not sure if PROC SSM and PROC VARMAX supports binary dependent var.

View solution in original post


All Replies
Super User
Posts: 10,028

Re: how to model binary outcome with time series predictors

If you are forecasting a variable, then it is called "Impulse Interventions"

I quoted example from documentation here. and

also check "Example 8.6: Detection of Level Changes in the Nile River Data"

in PROC ARIMA.

 

data a;
set a;
ad = (date = '1mar1992'd);
run;
proc arima data=a;
identify var=sales crosscorr=ad;
estimate p=1 q=1 input=ad;
run;
Occasional Contributor A_S
Occasional Contributor
Posts: 12

Re: how to model binary outcome with time series predictors

Thank you! Will this example cover cases where the impulse is the target variable?
Super User
Posts: 10,028

Re: how to model binary outcome with time series predictors

No. I don't know how to do Logistic Regression with time series data.

Maybe you should consider about PROC GLIMMIX .

Occasional Contributor A_S
Occasional Contributor
Posts: 12

Re: how to model binary outcome with time series predictors

Thank you!
Solution
‎08-09-2017 03:15 PM
SAS Super FREQ
Posts: 93

Re: how to model binary outcome with time series predictors

PROC NEURAL or HPNEURAL only support regular feed-forward neural net architectures, not recurrent neural net. You can mimic the time series effects by adding lagged dependent variable as inputs. This approach usually works pretty well for very short-term forecast as it is exactly how the model is trained. If multiple steps out forecast is required, you will run into issues with forecast errors propagating exponentially into the future steps because the forecasts has to be fed back into inputs for the lagged dependent variables to generate next step of forecast. The same issue applies to any non-time series models such as regression, logistic regression, decision tree, etc. It is less of an issue if you use lagged independent variables + all future values of independent variables are known.

 

I am not sure if PROC SSM and PROC VARMAX supports binary dependent var.

Occasional Contributor A_S
Occasional Contributor
Posts: 12

Re: how to model binary outcome with time series predictors

Posted in reply to alexchien
Thank you!
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 393 views
  • 3 likes
  • 3 in conversation