⇤ ← Revision 1 as of 2023-06-09 17:37:15
Size: 1253
Comment:
|
Size: 1243
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 25: | Line 25: |
=== Fixed Variables === | === Fixed === |
SPSS CasesToVars
The CASESTOVARS command translates a long dataset into wide format. See also VARSTOCASES.
Contents
Usage
casestovars /id=clientid /index=fiscalquarter.
The new variables will be named like Sales.1, Sales.2, and so on for each value of fiscalquarter. If the /INDEX subcommand was not specified, variables will be spread into an unknowable number of sequentially-named variables.
The dataset must be pre-sorted by all variables named on the /ID and /INDEX subcommands (in that order). If active, SPLIT FILE will also impact this procedure.
Fixed
If a variable is constant within the group, they should be marked as a fixed variable so that it isn't spread. These can be marked explicitly on the /FIXED subcommand.
casestovars /id=clientid /index=fiscalquarter /fixed=clientpoc.
SPSS also attempts to identify fixed variables automatically, and by default will mark them as such. Add the /AUTOFIX=YES subcommand to explicitly allow this behavior, or add the /AUTOFIX=NO subcommand to disable it.