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.

ADD FILES<br />

ADD FILES FILE={file}<br />

{* }<br />

[/RENAME=(old varnames=new varnames)...]<br />

[/IN=varname]<br />

/FILE=... [/RENAME=...] [/IN=...]<br />

[/BY varlist]<br />

[/MAP]<br />

[/KEEP={ALL** }] [/DROP=varlist]<br />

{varlist}<br />

[/FIRST=varname] [/LAST=varname]<br />

**Default if the subcommand is omitted.<br />

Example<br />

ADD FILES FILE=SCHOOL1 /FILE=SCHOOL2.<br />

Overview<br />

Options<br />

ADD FILES combines cases from 2 up to 50 SPSS-format data files by concatenating or<br />

interleaving cases. When cases are concatenated, all cases from one file are added to the<br />

end of all cases from another file. When cases are interleaved, cases in the resulting file are<br />

ordered according to the values of one or more key variables.<br />

The files specified on ADD FILES can be SPSS-format data files created by the SAVE or<br />

XSAVE commands or the working data file. The combined file becomes the new working<br />

file. Statistical procedures following ADD FILES use this combined file unless you replace<br />

it by building another working file. You must use the SAVE or XSAVE commands if you<br />

want to save the combined file as an SPSS-format data file.<br />

In general, ADD FILES is used to combine files containing the same variables but<br />

different cases. To combine files containing the same cases but different variables, use<br />

MATCH FILES. To update existing SPSS-format data files, use UPDATE. ADD FILES cannot<br />

concatenate raw data files. To concatenate raw data files, use DATA LIST within an INPUT<br />

PROGRAM structure (see p. 422 for an example). Alternatively, convert the raw data files<br />

to SPSS-format data files with the SAVE or XSAVE commands and then use ADD FILES to<br />

combine them.<br />

Variable Selection. You can specify which variables from each input file are included in the<br />

new working file using the DROP and KEEP subcommands.<br />

80

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

Saved successfully!

Ooh no, something went wrong!