BookmarkSubscribeRSS Feed
pmackay
Calcite | Level 5

I am doing bootstraps by rerunning proc model for 1000 randomly selected samples.

It's a system of equations estimated by GMM and the object of interest is the "objective value"

(actually objective*N), which is Hansen's J statistic. I want to save this to an output file at

each bootstrap iteration.

I cannot find how to do this in any of the SAS documentation.

I'm running SAS 9.4.

4 REPLIES 4
sbxkoenk
SAS Super FREQ

Hello,

 

Do you have a SOLVE statement?

SOLVE variables <SATISFY= equations> </options>;

 

I think the options that you need are:

OUT=SAS-data-set

Only the solution values are output by default.

 

OUTACTUAL

outputs the actual values of the solved variables read from the input data set to the OUT= data set. This option is applicable only if the OUT= option is specified.

 

OUTOBJVALS

writes the objective function value to the OBJVALS variable in the OUT= data set. The objective function value is computed only when the OPTIMIZE solution method is specified. This value is close to 0 when an unbounded simultaneous solution is computed and can be greater than 0 when bounds are active in the solution. This option applies only if the OUT= option is specified.

 

OUTPREDICT

writes the solution values to the OUT= data set. This option applies only if the OUT= option is specified.

The OUTPREDICT option is the default unless one of the other output options is specified.

 

Koen

 

sbxkoenk
SAS Super FREQ

Latest 9.4 documentation

on Hansen’s J test statistic

 

SAS/ETS 15.1

https://support.sas.com/documentation/onlinedoc/ets/151/model.pdf

p.1495

 

p.1744: reference to Hansen, L. P. publications.

sbxkoenk
SAS Super FREQ

You are interested in:

the object of interest is the "objective value"(actually objective*N), which is Hansen's J statistic.

 

Do you have this statistic in a table for the last bootstrap iteration (nbr. 1000)?

Are you missing the first 999 values

or don't you have anything?

 

Cheers,

Koen

pmackay
Calcite | Level 5

That did not work; I'm using a FIT statement - not a SOLVE stement.

 

However, this did:

"ods output GMMTestStats=GMMST;"

 

Adding this ODS statement before the Proc Model step outputs exactly what I need to a data file.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 577 views
  • 0 likes
  • 2 in conversation