note This macro will take sample pairs of data note from the hypothetical data in hypogpa.mtw worksheet. note note The user can specify how much output is seen for each sample: note "A lot" of output shows the scatterplot for each sample note "A little" output shows only the regression output note note The slope and intercept coefficients computed for each sample note are stored in columns 8 and 9. note note Enter 1 if you need me to open the file 'hypogpa.mtw' note or enter 0 if you have already opened that file. set 'terminal' c63; nobs 1. copy c63 k63 execute 'gparegcoef\gparegcoef6.mtb' k63 noecho let k1=1 erase c3-c11 name c3 'sim gpa' name c4 'sim hrs' name c7 'coefs' name c8 'as' name c9 'bs' note How many samples do you want to take? set 'terminal' c49; nobs 1. copy c49 k2 #k2=number of samples note note How many (x,y) pairs do you want in each sample? set 'terminal' c49; nobs 1. copy c49 k3 #k3=sample size (13) let k10=mean(c1) note How much regression output do you want to see? note Please enter 2 for a lot, 1 for a little, or 0 for none. set 'terminal' c49; nobs 1. copy c49 k4 #k4=brief level note #let k5=50 place holders #let k6=51 let k7=k4-1 #k7=output indicator let k8=(k4=0) exec 'gparegcoef/gparegcoef1.mtb' k2 note exec 'gparegcoef/gparegcoef2.mtb' k8 note Do you want to see a plot of the first 10 regression lines? note 1=yes, 0=no set 'terminal' c49; nobs 1. copy c49 k12 exec 'gparegcoef/gparegcoef4.mtb' k12 end