🔒 This topic is solved and locked.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 11-05-2017 08:42 PM
(1839 views)
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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;