Fuzzy code hanging up
Posted by
parisec on
Jul 26, 2022; 5:16pm
URL: http://spssx-discussion.165.s1.nabble.com/Fuzzy-code-hanging-up-tp5741022.html
Hi
I'm going to need to do a 1:10 matching for a matched case control study and I found this example syntax the GUI produced that someone shared on stackoverflow.
It runs, but it's hanging up and I'm not sure whether it's the code or the fact that my laptop is on the brink of destruction.
Would someone be willing to run this and let me know if works?. thanks
Carol
https://stackoverflow.com/questions/55890764/how-to-fix-case-control-matching-with-spss-fuzzy-command* Encoding: UTF-8.
DATASET CLOSE ALL.
NEW FILE.
OUTPUT CLOSE ALL.
INPUT PROGRAM.
LOOP supplier = 1 TO 745414.
COMPUTE case = (mod($CASENUM,4)=0).
COMPUTE age = SUM(TRUNC(UNIFORM(80)),8).
COMPUTE sex = SUM(TRUNC(UNIFORM(2)),1).
END CASE.
END LOOP.
END FILE.
END INPUT PROGRAM.
VALUE LABELS case 0 'Control' 1 'Case'/
sex 1 'Female' 2 'Male'.
EXECUTE.
** A 1:4 ratio *.
FREQUENCIES VARIABLES =case.
&&&&cp - this is the syntax that the original poster provided &&&** Your posted command -- fails for me **.
*FUZZY BY=age sex supplierid=supplier newdemanderidvar=sid group=case.
&&&cp - this is the syntax that the GUI produced. This is the end of the post so there was no indication of whether or not it ran.
** The command the UI built and pasted **.
FUZZY BY=age sex SUPPLIERID=supplier NEWDEMANDERIDVARS=sid GROUP=case EXACTPRIORITY=FALSE MATCHGROUPVAR=id
/OPTIONS SAMPLEWITHREPLACEMENT=FALSE MINIMIZEMEMORY=TRUE SHUFFLE=FALSE.