BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
sasgenie
Fluorite | Level 6

I am using HPLOGISTIC and HPREG to analyze a model with thousands of fixed effects as control variables. They are not the independent variables that I am interested in. Now the output has thousands of rows in the estimated coefficient report table. Is there anyway to prevent these fixed effects from showing up? 

 

A sample code would go as follows, where "fixed" has thousands of levels. I am only interested in the coefficients of x1 and x2, but not fixed.

PROC HPREG data=test;

    CLASS fixed;

    MODEL y = x1 x2 fixed;

RUN;

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ
  1. Use ODS EXCLUDE ParameterEstimates to suppress the printed table.
  2. Use ODS OUTPUT ParameterEstimates=PE to store the table as a SAS data set
  3. Use PROC SGRENDER to display the table by using the same template that PROC HPREG uses. You can use a WHERE statement to exclude any estimates that you don't want.
PROC HPREG data=test;
    CLASS fixed;
    MODEL y = x1 x2 fixed;
    ods exclude ParameterEstimates;
    ods output ParameterEstimates=PE;
RUN;

proc sgrender data=PE template=HPSTAT.HPREG.ParameterEstimates;
where Effect ^= "fixed";
run;

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ
  1. Use ODS EXCLUDE ParameterEstimates to suppress the printed table.
  2. Use ODS OUTPUT ParameterEstimates=PE to store the table as a SAS data set
  3. Use PROC SGRENDER to display the table by using the same template that PROC HPREG uses. You can use a WHERE statement to exclude any estimates that you don't want.
PROC HPREG data=test;
    CLASS fixed;
    MODEL y = x1 x2 fixed;
    ods exclude ParameterEstimates;
    ods output ParameterEstimates=PE;
RUN;

proc sgrender data=PE template=HPSTAT.HPREG.ParameterEstimates;
where Effect ^= "fixed";
run;

 

Rick_SAS
SAS Super FREQ

I wrote a short blog post that describes, in general, how to use a built-in ODS template to display a table of values:

"Use built-in ODS templates to display SAS tables"

SAS INNOVATE 2024

Innovate_SAS_Blue.png

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. 

Register now!

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 244 views
  • 4 likes
  • 2 in conversation