#Typical call is %pstmean c1 c2 c3 c3 c10 c11 c12, where c1 contains #the stratum weights, c2 contains the stratum sample sizes, c3 contains #the stratum sample means, c4 the stratum sample standard deviations, #c10 and c11 a table of descriptive statistics, c12 the stratum sample #standard errors. The fpc is ignored in computing the standard error #of the poststratification standard error. macro pstmean subpopwt subsamsz submn subsd labcol descol secol mcolumn subpopwt subsamsz submn subsd labcol descol secol mconstant nsample stratmn stsemean let nsample=sum(subsamsz) let secol=sqrt(subsd**2/subsamsz) let stratmn=sum(subpopwt*submn) let stsemean=sqrt(sum((subpopwt*subsd**2)/nsample) + sum(((1-subpopwt)*subsd**2)/nsample**2)) set labcol; format(a30). Stratified sample mean Estimated standard error end set descol stratmn stsemean end name secol 'Stratum standard errors' endmacro