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:
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!
Hereby some examples :
If you look at the example code in
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:
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!
The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.
Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.
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.