Hello, I have a dataset of model output from proc mixed that you can see below: data WORK.LOC_S; infile datalines dsd truncover; input Effect:$13. Estimate:D8.4 StdErr:D8.4 DF:BEST4. tValue:7.2 Probt:PVALUE6.4 Alpha:BEST6. Lower:D8.4 Upper:D8.4; format Estimate D8.4 StdErr D8.4 DF BEST4. tValue 7.2 Probt PVALUE6.4 Alpha BEST6. Lower D8.4 Upper D8.4; label StdErr="Standard Error" tValue="t Value" Probt="Pr > |t|"; datalines; Intercept 6.0372 0.9943 121 6.07 <.0001 0.05 4.0689 8.0056 locnum 0.9745 0.2117 31.3 4.60 <.0001 0.05 0.5429 1.4060 visit -0.3080 0.1693 66.3 -1.82 0.0734 0.05 -0.6459 0.03003 locnum*locnum -0.04245 0.01383 17.5 -3.07 0.0068 0.05 -0.07158 -0.01333 I want to combine the estimate and confidence interval into one variable, but when I do so, the leading zero for the negative decimals is lost. Here is my code: data loc;
set loc_s;
Est95CL=put(Estimate,Z5.3)||' ('||compress(put(Lower,Z5.3)||','||put(Upper,Z5.3)||')');
drop estimate lower upper stderr df tvalue alpha;
run; And this is what happens: data WORK.LOC; infile datalines dsd truncover; input Effect:$13. Probt:PVALUE6.4 Est95CL:$19.; format Probt PVALUE6.4; label Probt="Pr > |t|"; datalines; Intercept <.0001 6.037 (4.069,8.006) locnum <.0001 0.974 (0.543,1.406) visit 0.0734 -.308 (-.646,0.030) locnum*locnum 0.0068 -.042 (-.072,-.013) Does anyone know how to keep the zeros in front of the decimal points for the negative values?
... View more