Download Spotfire S+ User`s Guide for UNIX

Transcript
Resample
Example 1
The data set fuel.frame is taken from the April 1990 issue of
Consumer Reports. It contains 60 observations (rows) and 5 variables
(columns). Observations of weight, engine displacement, mileage,
type, and fuel were taken for each of sixty cars. We obtain bootstrap
estimates of mean and variation for the mean of the Mileage
variable.
1. Open the Bootstrap Inference dialog.
2. Type fuel.frame in the Data Set field.
3. Type mean(Mileage) in the Expression field.
4. On the Options page, type 250 in the Number of
Resamples field to perform fewer than the default number of
resamples. This speeds up the computations required for this
example.
5. Click on the Plot page, and notice that the Distribution of
Replicates plot is selected by default.
6. Click OK.
A bootstrap summary appears in the Report window, and a
histogram with a density line is plotted in a Graph window.
Example 2
In this example, we obtain bootstrap estimates of mean and variation
for the coefficients of a linear model. The model we use predicts
Mileage from Weight and Disp. in the fuel.frame data set.
1. Open the Bootstrap Inference dialog.
2. Type fuel.frame in the Data Set field.
3. Type
coef(lm(Mileage ~ Weight+Disp., data=fuel.frame))
in
the Expression field.
4. On the Options page, type 250 in the Number of
Resamples field to perform fewer than the default number of
resamples. This speeds up the computations required for this
example.
361