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
- /
- Proc Panel for dynamic panel models

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

07-09-2017 11:47 AM - edited 07-09-2017 06:17 PM

I have customer data that has sales, promotion (promo) and competitor sales (comp) information by customer and month. I'm trying to estimate the impact of promotion on sales. I'm intending to use Proc Panel, since this is a panel data. I know from domain knowledge that there is carryover (auto regressive) effect of sales and promotion for atleast 2 months.

Below is the first equation:

To eliminate individual customer specific effects (ai), we take first difference and obtain the following equation 2.

The above equation can be written in panel data is:

Proc panel data = cust_data; id cust time; instrument correlated =(comp sales_1); model Sales = promo promo_1 promo_2 comp comp_1 comp_2 sales_1 sales_2/gmm fdone nolevels; run;

Below are my questions:

- Goal is to estimate comp and sales_1 as instrument variable method ? How would I state these two variables in the instrument statement ?
- Can I use both fdone and nolevels ?, since comp and sales_1 are correlated with differenced error term, is it correct to mention in instrument statement under correlated ?
- Would fdone or nolevels in model take care of first difference estimation? or should I difference it ahead of time and supply the data in Proc Panel ?
- Is GMM1 or GMM2 appropriate? How to choose appropriate GMM?
- how to write the equation (1) using SAS proc panel?

Thank you for the help

Accepted Solutions

Solution

08-09-2017
03:13 PM

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

Posted in reply to Forecaster

07-10-2017 08:34 PM

Below are my questions:

- Goal is to estimate comp and sales_1 as instrument variable method ? How would I state these two variables in the instrument statement ?
- Can I use both fdone and nolevels ?, since comp and sales_1 are correlated with differenced error term, is it correct to mention in instrument statement under correlated ?
- Would fdone or nolevels in model take care of first difference estimation? or should I difference it ahead of time and supply the data in Proc Panel ?
- Is GMM1 or GMM2 appropriate? How to choose appropriate GMM?
- how to write the equation (1) using SAS proc panel?

To answer your questions in order:

1. To get instruments for sales_1, just use the keyword DEPVAR. To get instruments for the lagged values of comp you would include those in one of the other options for the INSTRUMENTS statement, for example

instruments depvar correlated = (comp);

2. You do not need the FDONE option. Once you specify GMM you are getting first-differenced equations. When combined with the NOLEVELS options, you are getting first-differenced equations exclusively.

3. The differencing is done for you once you specify GMM.

4. GMM1 assumes no serial correlation in the differenced residuals. If that's true then you gain some efficiency, but it's usually safer to use GMM2. GMM2 uses a data-based variance estimator for the differenced residuals.

5. If you are wanting to do standard fixed effects estimation then use

Proc panel data = cust_data; id cust time; model Sales = promo promo_1 promo_2 comp comp_1 comp_2 sales_1 sales_2/ fixone; run;

However, if you are wanting to do dynamic panel estimation using only the level equations then use

Proc panel data = cust_data; id cust time; instrument leveleq = (comp); model Sales = promo promo_1 promo_2 comp comp_1 comp_2 sales_1 sales_2/ gmm2 nodiffs; run;

Note that I changed CORRELATED to LEVELEQ in the INSTRUMENTS statement. That's because correlated variables are not instruments in the level equations, since they are correlated with the individual effects.

Please email me at Bobby.Gutierrez@sas.com (or post here) if you have any further questions.

All Replies

Solution

08-09-2017
03:13 PM

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

Posted in reply to Forecaster

07-10-2017 08:34 PM

Below are my questions:

- Goal is to estimate comp and sales_1 as instrument variable method ? How would I state these two variables in the instrument statement ?
- Can I use both fdone and nolevels ?, since comp and sales_1 are correlated with differenced error term, is it correct to mention in instrument statement under correlated ?
- Would fdone or nolevels in model take care of first difference estimation? or should I difference it ahead of time and supply the data in Proc Panel ?
- Is GMM1 or GMM2 appropriate? How to choose appropriate GMM?
- how to write the equation (1) using SAS proc panel?

To answer your questions in order:

1. To get instruments for sales_1, just use the keyword DEPVAR. To get instruments for the lagged values of comp you would include those in one of the other options for the INSTRUMENTS statement, for example

instruments depvar correlated = (comp);

2. You do not need the FDONE option. Once you specify GMM you are getting first-differenced equations. When combined with the NOLEVELS options, you are getting first-differenced equations exclusively.

3. The differencing is done for you once you specify GMM.

4. GMM1 assumes no serial correlation in the differenced residuals. If that's true then you gain some efficiency, but it's usually safer to use GMM2. GMM2 uses a data-based variance estimator for the differenced residuals.

5. If you are wanting to do standard fixed effects estimation then use

Proc panel data = cust_data; id cust time; model Sales = promo promo_1 promo_2 comp comp_1 comp_2 sales_1 sales_2/ fixone; run;

However, if you are wanting to do dynamic panel estimation using only the level equations then use

Proc panel data = cust_data; id cust time; instrument leveleq = (comp); model Sales = promo promo_1 promo_2 comp comp_1 comp_2 sales_1 sales_2/ gmm2 nodiffs; run;

Note that I changed CORRELATED to LEVELEQ in the INSTRUMENTS statement. That's because correlated variables are not instruments in the level equations, since they are correlated with the individual effects.

Please email me at Bobby.Gutierrez@sas.com (or post here) if you have any further questions.

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

Posted in reply to bobby_sas

09-17-2017 12:43 PM

Hello, is GMM possible with SAS Studio? If yes, how to do OLS, Fixed Effect Model, and Random Effect Model? I have one dependent variable and many independent variables in my dataset and I am studying it over the period of 1999 - 2016.

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

Posted in reply to Krisha_A

09-25-2017 08:01 AM

@Krisha_A Since this question has a solution and is closed, please start a new message with your question. It will get more visibility that way.

Thanks,

Shelley