I'm trying to add total row header and received an error messages because the Group variable is numeric. Can anyone recommend a solution? 26 data tab1; 27 input c $ year benes death; 28 list; 29 datalines; RULE: ----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0 30 a 2009 1 1 31 a 2010 1 0 32 a 2009 1 0 33 a 2010 1 1 34 a 2010 1 0 35 a 2010 1 0 36 b 2009 1 1 37 b 2010 1 0 38 b 2009 1 0 39 b 2010 1 0 NOTE: The data set WORK.TAB1 has 10 observations and 4 variables. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds 40 ; 41 run; 42 43 proc format; 44 value dec 45 0='No' 46 1='Yes' 47 ; NOTE: Format DEC is already on the library WORK.FORMATS. NOTE: Format DEC has been output. 2 The SAS System 11:28 Thursday, March 18, 2021 48 value missnum 49 . = '0' 50 other=[comma8.] 51 ; NOTE: Format MISSNUM is already on the library WORK.FORMATS. NOTE: Format MISSNUM has been output. 52 value missdec 53 . = '0' 54 other=[8.2] 55 ; NOTE: Format MISSDEC is already on the library WORK.FORMATS. NOTE: Format MISSDEC has been output. 56 value misspct 57 . = '0.0%' 58 other=[percent7.1] 59 ; NOTE: Format MISSPCT is already on the library WORK.FORMATS. NOTE: Format MISSPCT has been output. 60 run; NOTE: PROCEDURE FORMAT used (Total process time): real time 0.00 seconds cpu time 0.00 seconds 61 62 proc report data=tab1 split='~'; 63 columns c year benes=benessum ('deceased' death, benes) death=decpct 64 ('rate' death, benes=rate1) benes=rate2 ('increase likelihood~of disenrollment' likelihood); 65 define c /group ; 66 define year / group; 67 define benessum / sum 'Benes' format=missnum.; 68 define death / across '' format=dec. missing; 69 define benes / analysis '' sum format=missnum.; 70 define decpct / analysis 'pct deceased' mean format=misspct.; 71 define rate1 / analysis '' pctsum format=misspct.; 72 define rate2 / analysis 'pct of cohort' pctsum format=misspct.; 73 define likelihood / computed '' 74 format=missdec.; 75 break after c / summarize; 76 rbreak after / summarize; 77 compute after c; 78 year = 'Total'; 79 endcomp; 80 compute after; 81 c='Total'; 82 endcomp; 83 compute likelihood; 84 likelihood=_c8_/_c7_; 85 endcomp; 86 87 run; NOTE: Character values have been converted to numeric values at the places given by: (Line):(Column). 1:9 NOTE: Invalid numeric data, 'Total' , at line 1 column 9. NOTE: Invalid numeric data, 'Total' , at line 1 column 9. NOTE: Missing values were generated as a result of performing an operation on missing values. 3 The SAS System 11:28 Thursday, March 18, 2021 Each place is given by: (Number of times) at (Line):(Column). 1 at 1:17 NOTE: There were 10 observations read from the data set WORK.TAB1. NOTE: At least one W.D format was too small for the number to be printed. The decimal may be shifted by the "BEST" format. NOTE: PROCEDURE REPORT used (Total process time): real time 0.32 seconds cpu time 0.03 seconds
... View more