27.03.2013 Views

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SPSS® 12.0 Command Syntax Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Example<br />

CSPLAN<br />

/PLAN OUTFILE=’c:\survey\myfile.csplan’<br />

/DESIGN STRATA=region ses CLUSTER=district type<br />

/SAMPLE RATE=.2 MOS=districtsize METHOD=PPS_WOR<br />

/DESIGN CLUSTER=school<br />

/SAMPLE RATE=.3 METHOD=SIMPLE_WOR.<br />

CSSELECT 343<br />

An error occurs if PRESORTED is specified and the data are not sorted in proper order.<br />

SAMPLEFILE Subcommand<br />

The SAMPLEFILE subcommand is used to write sampled units to an external file.<br />

• The external file contains sampled cases only. By default all variables in the working data<br />

file are copied to the external file.<br />

• If SAMPLEFILE is specified data are not written to the working data file.<br />

• SAMPLEFILE must be used if with-replacement sampling is specified in the plan file. Otherwise<br />

an error is generated.<br />

• KEEP and DROP can be used simultaneously; the effect is cumulative. An error occurs if<br />

you specify a variable already named on a previous DROP or one not named on a previous<br />

KEEP.<br />

OUTFILE Keyword<br />

The OUTFILE keyword specifies the name of the external file. An external file or file handle<br />

must be specified. If the file exists it is overwritten without warning.<br />

KEEP Keyword<br />

The KEEP keyword lists variables to be copied from the working data file to the external file.<br />

KEEP has no bearing on the working data file.<br />

• At least one variable must be specified.<br />

• Variables not listed are not copied.<br />

• An error occurs if a specified variable does not exist in the working data file.<br />

• Variables are copied to the external file in the order in which they are listed.<br />

DROP Keyword<br />

The DROP keyword excludes variables from the external file. DROP has no bearing on the<br />

working data file.<br />

• At least one variable must be specified.<br />

• Variables not listed are copied.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!