options nodate nonumber ps=54 ls=76; data one; infile 'H:\public_html\data\agedeath.dat'; input group $ agedeath id; x=ranuni(1234); /* Set the seed to the first 4 digits of your UFID */ run; /* The following procedure gets mu, sigma for each group */ proc means mean std; class group; var agedeath; run; data aris; set one; if group='aris'; run; proc sort data=aris; by x; run; data aris; set aris; if _n_ <=12; run; /* This dataset constitutes a random sample of 12 aristocrats */ data gent; set one; if group='gent'; run; proc sort data=gent; by x; run; data gent; set gent; if _n_ <=12; run; /* This dataset constitutes a random sample of 12 gentry */ data sovr; set one; if group='sovr'; run; proc sort data=sovr; by x; run; data sovr; set sovr; if _n_ <=12; run; /* This dataset constitutes a random sample of 12 sovreign */ data allsamp; set aris gent sovr; run; proc print; run; quit;