MACRO sampfill x1 y.1 - y.p # # macro to make the rows of y.1 - y.p random samples of size # COUNT(x1) with replacement from x1 # copyright 2005 Robert L. Raymond University of St Thomas. Free use for # teaching and noncommercial research-retain this notice in this and derivative works MCOLUMN x1 y.1 - y.p entered MCONSTANT size k rep NOECHO # LET size = COUNT(x1) IF size = p NOTE How many replications do you want ? SET entered; FILE "TERMINAL"; NOBS 1. LET rep = entered(1) DO k = 1:p SAMPLE rep x1 y.k; REPLACE. ENDDO ELSE NOTE NOTE ERROR! Number of columns to be created must equal size NOTE of original sample. Please start over. ENDIF ECHO ENDMACRO