BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
pwang33
Calcite | Level 5

Hi, I am having trouble making a output table for my regression.

My dataset would look like

id height weight

1 100 200

2 200 300

3 100 400

1 200 300

2 100 130

3 200 400

If I run the regression

proc reg data=mydata; by id; model height = weight; run;

 

It will generate a report for each id group. I am only interested in parameter estimates table. How can I bring different groups of parameter estimate tables into one table? Thank you.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

You can look at the options under proc reg to add different statistics/values to the dataset, in this case TABLEOUT.

You can also, use the ODS table instead (ODS OUTPUT).

 

proc sort data=sashelp.class out=class;
by sex;
run;

proc reg data=class outest=want tableout;
by sex;
model height=weight age;
ods output parameterestimates=want2;
run;

proc print data=want;
run;
proc print data=want2;
run;

 

View solution in original post

3 REPLIES 3
Reeza
Super User

Have you tried the OUTEST= option on the PROC REG statement?

proc reg data=mydata OUTEST=WANT; 
by id; 
model height = weight; 
run;
pwang33
Calcite | Level 5

Hi Reeza, thank you for the quick reply.

This is a super silly question, but OUTEST option does not report me with t value. How can I add it into the WANT table?

 

Thank you! 

Reeza
Super User

You can look at the options under proc reg to add different statistics/values to the dataset, in this case TABLEOUT.

You can also, use the ODS table instead (ODS OUTPUT).

 

proc sort data=sashelp.class out=class;
by sex;
run;

proc reg data=class outest=want tableout;
by sex;
model height=weight age;
ods output parameterestimates=want2;
run;

proc print data=want;
run;
proc print data=want2;
run;

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 3 replies
  • 8250 views
  • 1 like
  • 2 in conversation