Converting datafiles from one individual per row to one family per row is easy in SPSS 11.5
For most models Mx requires an input file where each row contains the data from all members of the same family. Most researchers, however, prefer to enter their data on a one-individual-per-row basis. This means that the original datafile needs to be converted before entry into Mx. This used to be a time-consuming undertaking, especially when the data encompasses families with varying amounts of members.
Since version 11.5, SPSS allows easy restructuring of the data with the command CASESTOVARS (or VARSTOCASES to do it the other way around). This command can be accessed from the drop down menu in SPSS under DATA, RESTRUCTURE.
For example, your data may look like this in SPSS:
Now choose RESTRUCURE from the DATA drop menu, choose the second option: RESTRUCTURE SELECTED CASES INTO VARIABLES, click NEXT, select famid as Identifier variable and ppid as Index variable, click NEXT. Sort the current data : YES , click NEXT. Choose GROUP BY INDEX, click NEXT. Choose RUN NOW or PASTE THE SYNTAX. The latter will generate SPSS syntax like this:
SORT CASES BY famid ppid .
/ID = famid
/INDEX = ppid
/GROUPBY = INDEX .
Running this will result in a new datafile that looks like this :