#Typical call is %srsmean1 2000 c1 c11 c12. c1 contains the sample, #2000 is the population size and c11 and c12 contain a table of #descriptive statistics macro srsmean1 popsize samcol labcol descol mcolumn labcol descol samcol mconstant samsize sammean samsd samse popsize let samsize=count(samcol) let sammean=mean(samcol) let samsd=stan(samcol) let samse=(samsd/sqrt(samsize))*sqrt((popsize-samsize)/popsize) set labcol; format(a30). Population size Sample size Sample mean Sample mean standard error end set descol popsize samsize sammean samse end endmacro