turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Forecasting
- /
- how to model binary outcome with time series predi...

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-26-2017 02:52 PM

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2017 03:34 PM

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.

All Replies

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2017 12:20 AM

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;
```

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

03-28-2017 01:36 PM

Thank you! Will this example cover cases where the impulse is the target variable?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-28-2017 09:46 PM

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

Maybe you should consider about PROC GLIMMIX .

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Ksharp

03-31-2017 08:28 AM

Thank you!

Solution

08-09-2017
03:15 PM

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

03-27-2017 03:34 PM

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to alexchien

03-28-2017 01:34 PM

Thank you!