BookmarkSubscribeRSS Feed

[SAS 프로그래밍 고수 백승민] [ODS] ODS를 사용하여 그래프 그리기와 SAS제공 템플릿

Started ‎06-11-2020 by
Modified ‎06-11-2020 by
Views 130

 

* 현재 사용 가능한 스타일 확인하기;
PROC TEMPLATE;
     LIST STYLES;
RUN;

 * SAS 제공 템플릿 형태 확인하기;
* http://sasstyle.web.unc.edu/page/3/?post_type=styles;

 * SAS9.2에서 제공;

******************************************************************;
* style= 을 부분을 변경                                           ;
******************************************************************;
* 기본 그래프;
ods html path='.' (url=none) gpath='.'(url=none) file='reg_odsg.html' style=Festival;
ods graphics on / imagefmt=jpeg imagename='Reg';

proc sgplot data=sashelp.heart;
     vbar chol_status;
run;

proc sgplot data=sashelp.heart;
     vbox AgeatDeath / category=chol_status;
run;

proc sgplot data=sashelp.heart;
     reg x=cholesterol y=ageatdeath / CLM CLI;
run;

proc sgpanel data=sashelp.heart;
     panelby sex;
     loess x=ageatdeath y=agechddiag / clm alpha=.1;
run;

ods graphics off;
ods html close;


* 회귀분석;
ods html path='.' (url=none) gpath='.'(url=none) file='reg_odsg.html' style=Festival;
ods graphics on / imagefmt=jpeg imagename='Reg';

proc reg data=sashelp.heart;
     model Cholesterol = AgeCHDDiag;
quit;
ods graphics off;
ods html close;

 * 그래프 출력 결과;

 

 

 

 

 

 

 

 

 

 

 

 

 

* 회귀분석 출력 결과;

 

The REG Procedure

 

Model: MODEL1
Dependent Variable: Cholesterol

 

Number of Observations Read 5209
Number of Observations Used 1408
Number of Observations with Missing Values 3801


 

Analysis of Variance
Source DF Sum of
Squares
Mean
Square
F Value Pr > F
Model 1 41.22833 41.22833 0.02 0.8918
Error 1406 3130592 2226.59477    
Corrected Total 1407 3130633      



Root MSE 47.18681 R-Square 0.0000
Dependent Mean 240.62074 Adj R-Sq -0.0007
Coeff Var 19.61045    


 

Parameter Estimates
Variable Label DF Parameter
Estimate
Standard
Error
t Value Pr > |t|
Intercept Intercept 1 239.53418 8.08341 29.63 <.0001
AgeCHDdiag Age CHD Diagnosed 1 0.01714 0.12596 0.14 0.8918

 

 

Version history
Last update:
‎06-11-2020 10:04 PM
Updated by:
Contributors

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

Article Labels
Article Tags