# Bootstrapping to get estimates of the mean or standard error of a variable

## Technote (troubleshooting)

## Problem(Abstract)

I need to use bootstrapping to get estimates of the mean and standard error of a variable.

There 250 are observations and I need to generate 2500 samples.

How do I do it?

## Resolving the problem

Beginning with Release 18, there is a Bootstrapping module that offers bootstrapped results from various procedures. In all releases, the CNLR program, available in SPSS Statistics will automatically compute bootstrap samples for any linear or nonlinear model, and use these samples to estimate the standard errors of the parameters. For example to get a bootstrap estimate of the mean and its standard error, the following commands will work:

MODEL PROGRAM mean=1.

COMPUTE pred=mean.

CNLR varname /OUTFILE='filename.sav'

/BOOTSTRAP 2500.

The MODEL PROGRAM sets up a parameter called "mean" and initializes it to 1. The COMPUTE statement defines the "nonlinear" model, which in this case, is just the mean. The standard error of the mean will be calculated using the 2500 bootstrap samples.

In addition, the procedure will save an SPSS Statistics system file that contains a case for each of the 2500 samples and a case that represents the estimate from the actual sample. The variables will be the parameters, the mean and the SSE, as well as the sample number and N of cases. These may be used to show the bootstrap distribution

## Historical Number

12772

### Document information

**More support for:**
SPSS Statistics

**Software version:**
Not Applicable

**Operating system(s):**
Linux, Windows, iOS

**Reference #:**
1476033

**Modified date:**
2015-08-03