spss_vars_to_cases
Restructure wide datasets into long format by stacking variable groups into new variables. Reshape SPSS .sav files with custom index and ID variables.
Instructions
Restructure wide → long format: VARSTOCASES /MAKE newvar FROM varlist. make_specs: list of {'new_var': name, 'variables': [var1, var2, ...]}; index_name: index variable name; id_name: case ID variable. Requires IBM SPSS Statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id_name | No | ||
| file_path | Yes | ||
| index_name | No | ||
| make_specs | Yes | ||
| output_path | No | long.sav | |
| count_variable | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |