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.
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
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.
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
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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.