----> My code was: /* Library setup */ libname CC '/folders/myfolders'; options fmtsearch=(CC.formats); OPTIONS nofmterr; /* ---------------------------------------- */ /* ------- LOAD DATA FILES INTO SAS ------- */ /* ---------------------------------------- */ /* Build data tables*/ PROC IMPORT OUT= CC.CC_EigenvalueMeasures DATAFILE= "/folders/myfolders/CC_EigenvalueMeasures.csv" DBMS=csv REPLACE; GETNAMES=YES; GUESSINGROWS=MAX; DATAROW=2; RUN; /* ---------------------------------------- */ /* ----------- DATA DICTIONARIES ---------- */ /* ---------------------------------------- */ /* Data Dictionaries */ ods rtf file='/folders/myfolders/CC/Dictionary1.doc'; proc contents data=CC.CC_EigenvalueMeasures varnum; run; ods rtf close; /* Create work files */ data CC_EigenvalueMeasures_Work; set CC.CC_EigenvalueMeasures; run; /* ---------------------------------------------- */ /* ------------- ANALYSIS ----------------------- */ /* ---------------------------------------------- */ /* ---- Analysis for all Subjects ----*/ data WorkingData_CC_all; set CC_EigenvalueMeasures_Work; run; /* ---- Analysis for men only ----*/ data WorkingData_CC_men; set CC_EigenvalueMeasures_Work; if StartAge=. then delete; run; /* --------------------------------------------------------------------------- */ /* --------- START PROC MIXED ANALYSES FOR CC ---------------- */ /* --------------------------------------------------------------------------- */ /* Set up long format for CC ?? */ data CC_long; length Measure $26; set CC_EigenvalueMeasures_Work; outcome=CCI_MidEV;measure='CCI_MidEV';output; outcome=CCI_MaxEV;measure='CCI_MaxEV';output; outcome=CCII_MidEV;measure='CCII_MidEV';output; outcome=CCII_MaxEV;measure='CCII_MaxEV';output; drop CCI_MidEV CCI_MaxEV CCII_MidEV CCII_MaxEV; run; ----> Following the Code you gave me: %let tableName = CC_long; *create format for missing; proc format ; value $ missfmt ' '="Missing" other="Not Missing"; value nmissfmt .="Missing" other="Not Missing"; run; *Proc freq to count missing/non missing; ods table onewayfreqs=temp; proc freq data=&tableName.; table _all_ / missing; format _numeric_ nmissfmt. _character_ $missfmt.; run; *Format output; data long; length variable $32. variable_value $50.; set temp; Variable=scan(table, 2); Variable_Value=strip(trim(vvaluex(variable))); presentation=catt(frequency, " (", trim(put(percent/100, percent7.1)), ")"); keep variable variable_value frequency percent cum: presentation; label variable='Variable' variable_value='Variable Value'; run; proc sort data=long; by variable; run; proc transpose data=long out=want; by variable; id variable_value; var presentation; run; Yes, I had checked the data. All is there.
... View more