因此,这是我所拥有的示例,并说明了我要寻找的内容。我似乎无法使SPSS中的重组功能正常工作,这可能是工作的错误工具。任何帮助,将不胜感激。谢谢!
有什么想法吗?谢谢!
答案 0 :(得分:1)
What you are missing is a key\index variable. Try this:
* first recreating your sample data.
data list list/ ID (f10) Car_Make Car_Model (2a20).
begin data
999, "Subaru", "WRX"
867, "Volvo", "240"
999,"Acura", "TSX"
end data.
* now creating an index and restructuring.
sort cases by ID.
compute ind=1.
format ind(f2).
if $casenum>1 and ID=lag(ID) ind=lag(ind)+1.
casestovars /id=ID/index=ind/sep="_".