Getting Superscripts into your SAS output Martha Cox Population Health Research Unit Community...
-
Upload
jasper-holland -
Category
Documents
-
view
234 -
download
0
Transcript of Getting Superscripts into your SAS output Martha Cox Population Health Research Unit Community...
Getting Superscripts Getting Superscripts into your SAS outputinto your SAS output
Martha CoxMartha CoxPopulation Health Research UnitPopulation Health Research Unit
Community Health & EpidemiologyCommunity Health & EpidemiologyDalhousie UniversityDalhousie University
Two MethodsTwo Methods
For PUT statements, labels, and formatted values, use hex values
For ODS output, use in-line formatting with the ESCAPECHAR= option
The input data set: REPORTThe input data set: REPORT
Obs line count pct
1 LINE01 . . 2 LINE02 237228 . 3 LINE03 7425 . 4 LINE04 . . 5 LINE05 2706 36.4444 6 LINE06 390 5.2525 7 LINE07 94 1.2660 8 LINE08 4406 . 9 LINE09 . . 10 LINE10 3 0.0681 11 LINE11 23 0.5220
Serious Complications of Rhythmopathy in Nova Scotia
N2 (%)2
Inclusion Criteria
Men and women 18-24 years of age on 01-APR-02 and eligible for Nova Scotia Medicare
237,228
who were first diagnosed with rhythmopathy during the period 01-APR-02 to 31-MAR-03¹
7,425
Exclusion Criteria
Those with a previous diagnosis of Boogie Fever in the 5 years prior to index diagnosis
2,706 36.44%
Those with a previous diagnosis of Boogie Woogie Flu in the 5 years prior to index diagnosis
390 5.25%
Those with a previous diagnosis of Rockin Pneumonia in the 2 years prior to index diagnosis
94 1.26%
Final Cohort 4,406
Outcomes
Clapping on the up-beat 3 0.06%
Chronic stepping on dance partner's feet 23 0.52%
1 The first diagnosis of rhythmopathy received during the period 01-APR-02 to 31-MAR-03 is referred to throughout this
document as the index colonoscopy. 2 For exclusion criteria, N and % represent the number and percentage of patients in the initial cohort who satisfied that
criterium. For outcomes, N and % represent the number and percentage of patients in the final cohort who satisfied the definition of
that outcome.
data _null_; file print; put 'This is a superscript zero' 'b0'x; put 'This is a superscript one' 'b9'x; put 'This is a superscript two' 'b2'x; put 'This is a superscript three' 'b3'x;run;
- - - - - - - - - - - - - - - - - - - - - - - - - -
This is a superscript zero°This is a superscript one¹This is a superscript two²This is a superscript three³
Using Hex Values in PUT Using Hex Values in PUT StatementsStatements
proc print data=sashelp.class label;
label age=age'b2'x;
run;
- - - - - - - - - - - - - - - - - - - - - - - - - -
Obs Name Sex age² Height Weight
1 Alfred M 14 69.0 112.5
2 Alice F 13 56.5 84.0
3 Barbara F 13 65.3 98.0
4 Carol F 14 62.8 102.5
5 Henry M 14 63.5 102.5
Using Hex Values in LabelsUsing Hex Values in Labels
proc format;
value $line
'LINE01' = 'Inclusion Criteria'
'LINE02' = 'Men and women 18-24 years of age on 01-APR-02 and
eligible for Nova Scotia Medicare'
'LINE03' = "who were first diagnosed with rhythmopathy during the
period 01-APR-02 to 31-MAR-03" 'b9'x
'LINE04' = 'Exclusion Criteria'
'LINE05' = 'Those with a previous diagnosis of Boogie Fever in
the 5 years prior to index diagnosis'
'LINE06' = 'Those with a previous diagnosis of Boogie Woogie Flu
in the 5 years prior to index diagnosis'
'LINE07' = 'Those with a previous diagnosis of Rockin Pneumonia
in the 2 years prior to index diagnosis'
'LINE08' = 'Final Cohort'
'LINE09' = 'Outcomes'
'LINE10' = 'Clapping on the up-beat'
'LINE11' = "Chronic stepping on dance partner's feet"
;
run;
Using Hex Values in Format ValuesUsing Hex Values in Format Values
Serious Complications of Rhythmopathy in Nova Scotia
N2 (%)2
Inclusion Criteria
Men and women 18-24 years of age on 01-APR-02 and eligible for Nova Scotia Medicare
237,228
who were first diagnosed with rhythmopathy during the period 01-APR-02 to 31-MAR-03¹
7,425
Exclusion Criteria
Those with a previous diagnosis of Boogie Fever in the 5 years prior to index diagnosis
2,706 36.44%
Those with a previous diagnosis of Boogie Woogie Flu in the 5 years prior to index diagnosis
390 5.25%
Those with a previous diagnosis of Rockin Pneumonia in the 2 years prior to index diagnosis
94 1.26%
Final Cohort 4,406
Outcomes
Clapping on the up-beat 3 0.06%
Chronic stepping on dance partner's feet 23 0.52%
1 The first diagnosis of rhythmopathy received during the period 01-APR-02 to 31-MAR-03 is referred to throughout this
document as the index colonoscopy. 2 For exclusion criteria, N and % represent the number and percentage of patients in the initial cohort who satisfied that
criterium. For outcomes, N and % represent the number and percentage of patients in the final cohort who satisfied the definition of
that outcome.
ODS In-line FormattingODS In-line Formatting
Introduced as experimental for RTF and HTML in v8.2. Will be production for all destinations in v9.2.
Not found in on-line documentation.Info found on SAS Support web site:
– http://support.sas.com/rnd/base/topics/expv8/inline82.html
– http://support.sas.com/rnd/base/topics/templateFAQ/Template_rtf.html#escapechar
ods rtf file="temp";ods escapechar='^';
proc print data=sashelp.class; title1 "This value is superscripted ^{super 2}"; title2 "This value is subscripted ^{sub 2}";run;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - -
ODS In-line FormattingODS In-line Formatting
This value is superscripted 2 This value is subscripted 2
Obs Name Sex Age Height Weight
1 Alfred M 14 69.0 112.5
2 Alice F 13 56.5 84.0
ods rtf file="Rhythmopathy.rtf";ods escapechar='^';
title1 j=l "Serious Complications of Rhythmopathy in Nova Scotia";
footnote1 "^S={font_face=Times font_size=9 pt}^{super 1}The first diagnosis of rhythmopathy received during
the period 01-APR-02 to 31-MAR-03 is referred to throughout this document as the index colonoscopy.";
footnote2 "^S={font_face=Times font_size=9 pt}^{super 2}For exclusion criteria, N and % represent the
number and percentage of patients in the initial cohort who satisfied that criterium.";
footnote3 "^S={font_face=Times font_size=9 pt} For outcomes, N and % represent the number and percentage of patients in the final cohort who satisfied the definition of that outcome.";
ODS In-line FormattingODS In-line Formatting
proc report data=prtlines2 headline nocenter; column line count pct ; define line / order order=data flow left width=44 format=$line. ' ' ; define count / display right width=8 format=comma8. "N^{super 2}" ; define pct / display right width=8 format=pct. "(%)^{super 2}" ; break after line / skip;run;
ods rtf close;
ODS In-line FormattingODS In-line Formatting
Serious Complications of Rhythmopathy in Nova Scotia
N2 (%)2
Inclusion Criteria
Men and women 18-24 years of age on 01-APR-02 and eligible for Nova Scotia Medicare
237,228
who were first diagnosed with rhythmopathy during the period 01-APR-02 to 31-MAR-03¹
7,425
Exclusion Criteria
Those with a previous diagnosis of Boogie Fever in the 5 years prior to index diagnosis
2,706 36.44%
Those with a previous diagnosis of Boogie Woogie Flu in the 5 years prior to index diagnosis
390 5.25%
Those with a previous diagnosis of Rockin Pneumonia in the 2 years prior to index diagnosis
94 1.26%
Final Cohort 4,406
Outcomes
Clapping on the up-beat 3 0.06%
Chronic stepping on dance partner's feet 23 0.52%
1 The first diagnosis of rhythmopathy received during the period 01-APR-02 to 31-MAR-03 is referred to throughout this
document as the index colonoscopy. 2 For exclusion criteria, N and % represent the number and percentage of patients in the initial cohort who satisfied that
criterium. For outcomes, N and % represent the number and percentage of patients in the final cohort who satisfied the definition of
that outcome.
The EndThe End