#Typical call is %pstprop c1 c2 c3 c10 c11 c12, where c1 contains #the stratum weights, c2 contains the stratum sample sizes, #c3 the stratum proportions, c10 and c11 a table of descriptive #statistics and c12 the individual stratum standard errors. This #macro ignores the fpc in computing the post-stratification estimator. macro pstprop subpopwt subsamsz subp labcol descol secol mcolumn subsamsz subp labcol descol secol subpopwt wkcol mconstant npop nlevel stratp stsep i nsample let nsample=sum(subsamsz) let secol=sqrt(subp*(1-subp)/(subsamsz-1)) let stratp=sum(subpopwt*subp) let wkcol=subp*(1-subp)*subsamsz/(subsamsz-1) let stsep=sqrt(sum(subpopwt*wkcol)/nsample+sum((1-subpopwt)*wkcol)/nsample**2) set labcol; format(a30). Stratified sample mean Estimated standard error end set descol stratp stsep end name secol 'Stratum standard errors' endmacro