Oh, sorry. I missed the part about selecting only values 1-25 of VOL.
SELECT IF RANGE(VOL,1,25).
EXECUTE.
should get just the VOL records you want to keep. If I downloaded and imported the same dataset you did, running the above SELECT IF still leaves me with 249,000+ cases, so there must be some other restrictions you need; those can most likely all be accommodated in a SELECT IF statement. From there, you/we can figure out how to re-structure the data to give you what you want.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------
Original Message:
Sent: Fri February 17, 2023 05:45 AM
From: Rachael B
Subject: Problem restructuring single variable into cases
The issue with aggregate is that it only creates 21 cases in the new dataset (based on the number of different entries under 'VOL', ranging from 1-25). I think I may just have to rewrite the dataset myself with separate cases for each individual, but thank you for your help!
------------------------------
Rachael B
Original Message:
Sent: Thu February 16, 2023 10:48 AM
From: Rick Marcantonio
Subject: Problem restructuring single variable into cases
Hi. I'm wondering if AGGREGATE <file> /BREAK=VOL /etc... might work better in this case; I'm not sure, obviously, but that will create a dataset with the number of cases equal to the number of unique values of that BREAK variable. The issue there will be what values of the other variables to use; for example, the mean of the numeric variables, the first instance in a BREAK group, etc.
Look at the AGGREGATE command and see if that might be what you want.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
Original Message:
Sent: Thu February 16, 2023 04:38 AM
From: Rachael B
Subject: Problem restructuring single variable into cases
I am using a database on the use of a procedure, specifically, this one here titled 'detailed civil data': https://www.gov.uk/government/statistics/legal-aid-statistics-july-to-september-2022. There are 534 rows of cases that I'm interested in. However, each case does not represent an actual individual, but rather the type of issue. The number of individuals in the procedure is instead represented by a 'VOL' variable. So, one case might have a volume of 1, whereas another may have 3 or 4. There are 1844 individuals within the data I'm interested in.
I'd like to restructure the data so that there are 1844 cases, each one representing a different individual/respondent. Unfortunately, I'm struggling to understand how to use the Restructure tool on SPSS. I'm finding that the number of rows is staying the same (at 534), or sometimes doubles to 1068. Is there a specific way on SPSS to do this, or is it not possible? Thank you :).
------------------------------
Rachael B
------------------------------