Friday, September 05, 2008

How to set decimal place for SUDAAN

How to set decimal place for SUDAAN
There are two ways (in italic):
1) PROC CROSSTAB DATA=EYE DESIGN =WR;
    SETENV DECWIDTH=3;
    NEST STRATA4 PSU4/MISSUNIT;
    WEIGHT MECWGT4;
    SUBPOPN POPMEC=1;
    CLASS DM2 OPDURL4/NOFREQ;
    TABLE DM2*OPDURL4;
    PRINT NSUM /*WSUM*/ ROWPER SEROW/STYLE=NCHS  WSUMFMT=F10.;
  RUN;
2)
PROC CROSSTAB DATA=EYE DESIGN =WR;
    NEST STRATA4 PSU4/MISSUNIT;
    WEIGHT MECWGT4;
    SUBPOPN POPMEC=1;
    CLASS DM2 OPDURL4/NOFREQ;
    TABLE DM2*OPDURL4;
    PRINT NSUM WSUM ROWPER SEROW/STYLE=NCHS WSUMFMT=F10.3;
  RUN;