老规矩先导入数据:
%let dir=数据所在的文件夹;
libname cert "&dir";
libname newproject "&dir";
options mprint mlogic;
二话不说先把macro programs给call出来。
%inc "macro.sas" ;
赋值:
proc format;
value tabfmt
1="行列名称1"
2="行列名称2"
3="行列名称3"
4="行列名称4"
5="行列名称5"
value $aesocfmt
"1"="自己赋值1"
"2"="自己赋值2"
"X"="自己赋值3"
"XX"="自己赋值4"
"XXX"="自己赋值5"
value $RELATN
(举例子)
"DEF" = "Definite"
"ISD" = "Insufficient data"
"NA" = "Not applicable"
"NONE" = "None"
"POS" = "Possible"
"PROB" = "Probable"
"RN" = "Reasonably no"
"RY" = "Reasonably yes"
"UNL" = "Unlikely";
value $INTENS
(举例子)
"MIL" = "Mild"
"MIN" = "Minimum"
"MOD" = "Moderate"
"NA" = "Not applicable"
"NO" = "None"
"SEV" = "Severe"
"VSE" = "Very severe";
run;
设置一下format,常用的统计方法都写进去了:
proc format;
value $stat
stat01="nex"
stat02="ave"
stat03="dev"
stat04="cvp"
stat05="med"
stat06="min"
stat07="max"
stat08="lqt"
stat09="uqt"
stat10="geom"
stat11="CVb"
stat12="nmiss"
stat13="sum"
stat14="Mean(SD)"
/*stat15="Median(IQR)"*/
stat15="Median"
stat16="Min-Max"
stat17="pecentage"
/*stat18="incidence"*/
stat18="n