new file.
set seed 20130407.
input program.
vector PopX(1000,f6.3).
loop #i = 1 to 1000.
compute PopX(#i) = rv.normal(0,1).
end loop.
end case.
end file.
end input program.
execute.
dataset name madeup.
dataset activate madeup.
* this next command needs to be adapted to your data.
vector PopX = PopX1 to PopX1000.
* from pop of 1000 draw 100 samples of size 50 WITH replacement.
compute #PopSize = 1000.
compute #nSamples=100.
compute #nDraws=50.
numeric SampledX (f6.3) CasePicked (N7).
loop sample_id = 1 to #nSamples.
loop draw = 1 to #nDraws.
compute CasePicked = trunc(rv.uniform(1, (#PopSize+1))).
compute SampledX = PopX(CasePicked).
xsave outfile = 'c:\project\long1.sav' /keep =sample_id draw
CasePicked SampledX.
end loop.
end loop.
execute.
get file= 'c:\project\long1.sav'.
dataset name longy.
split file by sample_id.
frequencies vars = casepicked /format=dfreq.
descriptives variables = SampledX.
Art Kendall