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

Hi,

 

I use the following code to regress var1 on var2 and var3, and then output the intercepts to model1 dataset.

 

proc reg data=have outest=model1 (keep=intercept); model var1=var2 var3; run;

 

My question is that if I could adjust this code so that model1 includes the intercept as well as its corresponding standard error and/or p-value and the number of observations used for estimation.

 

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Sure. Use the TABLEOUT option on the P{ROC REG statement:

 

proc reg data=sashelp.class outest=model1 tableout plots=none; 
model weight=height age; 
quit;

proc print; run;

View solution in original post

3 REPLIES 3
PGStats
Opal | Level 21

Use ODS OUTPUT to capture the output tables:

 

proc reg data=sashelp.class plots=none;
model weight = age height;
ods output parameterEstimates=pe Nobs=nobs;
run;

data stats;
set pe(where=(Variable="Intercept"));
set nobs(where=(Label="Number of Observations Used"));
run;

PG
Rick_SAS
SAS Super FREQ

Sure. Use the TABLEOUT option on the P{ROC REG statement:

 

proc reg data=sashelp.class outest=model1 tableout plots=none; 
model weight=height age; 
quit;

proc print; run;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 2073 views
  • 1 like
  • 3 in conversation