# Bootstrap ordinary least square (OSL) estimators

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | Question: Is there a systax to do bootstrapping for OLS estimators in SPSS? we know some softwares like TSP could do this job. i would really appreciate someone's help in this regard. Answer: The CNLR procedure for constrained nonlinear regression does unconstrained linear regression as a special case, and it offers bootstrapped estimates of the standard errors. In the dialog boxes, select Statistics or Analyze->Regression->Nonlinear, then look in the Options dialog for the checkbox for bootstrapping. Unfortunately, you have to go through the trouble of defining the linear equation and giving starting values for the parameters (power comes at a price). Another option should you want to consider it would be to create bootstrapped samples and run them through REGRESSION or GLM and save the coefficients to work with yourself. The following SPSS commands produce bootstrapped samples (you have to change nsamples and ncases to the desired number of samples and the appropriate number of cases). COMPUTE ID=$CASENUM . SAVE OUTFILE 'BOOTDATA.SAV'. INPUT PROGRAM . LOOP SAMP=1 to nsamples. LOOP V = 1 to ncases. COMPUTE ID=TRUNC(UNIFORM(ncases)) + 1. END CASE. LEAVE SAMP. END LOOP. END LOOP. END FILE. END INPUT PROGRAM . SORT CASES BY ID . MATCH FILES / FILE * / TABLE 'BOOTDATA.SAV' / BY ID . SORT CASES BY SAMP. SPLIT FILE BY SAMP. David Nichols Principal Support Statistician and Manager of Statistical Support |

Related pages

...