Turn on suggestions

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

Showing results for

- Home
- /
- Analytics
- /
- Forecasting
- /
- Standard errors and t-tests of AIDS elasticities?

Options

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

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 09-21-2021 02:38 PM
(271 views)

Hi SAS Community,

I'm working on demand estimation for foods using Almost Ideal Demand System (AIDS). I looked at these two examples and they have been extremely helpful:

https://support.sas.com/rnd/app/ets/examples/aids/index.htm

https://support.sas.com/rnd/app/ets/examples/elasticity/index.htm

Up to now I have got the parameters from the AIDS model, and the calculated income elasticities and price elasticities. But the examples do not have instructions on how to calculate the standard errors of these elasticities. I'd like to conduct t-tests to see which elasticities are statistically significant, so calculating s.e. is necessary.

I know theoretically how to calculate the s.e. using either the Delta method, or using bootstrap, but I'm not sure how to realize it in SAS. Could someone give me some instruction on that? It would be greatly helpful if someone could use the example data in the SAS support pages above to illustrate it.

Thanks very much!

Liu

4 REPLIES 4

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello Liu,

Hereby some examples :

- The essential guide to bootstrapping in SAS

By Rick Wicklin on The DO Loop December 12, 2018

https://blogs.sas.com/content/iml/2018/12/12/essential-guide-bootstrapping-sas.html - The bootstrap method in SAS: A t test example

By Rick Wicklin on The DO Loop June 20, 2018

https://blogs.sas.com/content/iml/2018/06/20/bootstrap-method-example-sas.html - For the Delta method, see :

Usage Note 30333: FASTats: Frequently Asked-For Statistics

https://support.sas.com/kb/30/333.html

Kind regards,

Koen

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hello, @liu6200

If you look at the example code in

Calculating Elasticities in an Almost Ideal Demand System (sas.com)

it already shows an example how to obtain elasticities and their standard errors and t statistics and their p values using the ESTIMATE statement in PROC MODEL.

estimate 'elasticity beef' (gbb - bb*(.5 - bb*9.0))/.5 - 1;

The following section of documentation discusses how the standard errors of functions of parameters are computed in PROC MODEL:

https://go.documentation.sas.com/doc/en/pgmsascdc/v_017/etsug/etsug_model_sect034.htm

The above code example is the simplest case where you know exactly at what specific value of w_beef and Ln(X/P) you want to compute the elasticity. If you need to compute elasticities at the mean point of the variables in the data set as is done in the IML code in the example, then you will need to compute the w_beef and Ln(X/P) values at the mean values in the data set, then substitute those values in the elasticity formula in the ESTIMATE statement. The mean of w_i's are already computed in the PROC MEANS step in the example, the Ln(X/P) term at the mean point in the nonlinear AIDS model is more involved, but in the end, it is still just a function of parameters in the model and mean values of variables in the data set as shown in the PROC IML code. You just need to extract those mean values and specify the elasticities in terms of functions of the parameters and constants in the ESTIMATE statement. You may find it helpful to follow the PROC IML code in the example to write out the explicit expression of the elasticities in terms of parameters and variables(at the means) for each element of the elasticity matrix, then specify the expressions which are functions of the parameters and constants in the ESTIMATE statement.

You may also find it the easiest to work with income elasticities first since the income elasticity formula only involves b_i and w_i, (e_i = b_i/w_i + 1), where b_i's are parameters in the model, and w_i's are computed in the PROC MEANS step in the example code.

I hope this helps. Good luck!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thanks! I will try that!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

You are welcome! 🙂

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

**If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. **

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.