* Propensity Score Matching.
begin program python3.
import spss, random, spssaux, codecs
try:
import FUZZY
except:
print("This procedure requires the FUZZY extension command which is not installed.")
parts = [int(i) for i in FUZZY.__version__.split(".")]
if parts < [1,3,0]:
raise EnvironmentError("This procedure requires version 1.3.0 or later of FUZZY")
ds = spss.ActiveDataset()
if ds =="*":
ds = "D" + str(random.random())
spss.Submit("DATASET NAME " + ds)
matchgroup = "M" + str(random.random()) #temporary variable
tempdsname = "D" + str(random.random())
lrcmd = spssaux.u(r"""LOGISTIC REGRESSION VARIABLES COHORT
/METHOD=ENTER Age BMI WHO
/SAVE=PRED(PropScore).""")
try:
spss.Submit(lrcmd)
except:
raise ValueError("Logistic Regression step failed")
fuzzycmd = spssaux.u(r"""FUZZY BY=PropScore SUPPLIERID=CaseID NEWDEMANDERIDVARS=MatchID
GROUP=COHORT EXACTPRIORITY=FALSE
MATCHGROUPVAR=%(matchgroup)s FUZZ=.005 DS3=%(tempdsname)s
/OPTIONS SAMPLEWITHREPLACEMENT=FALSE MINIMIZEMEMORY=TRUE SHUFFLE=FALSE .
DELETE VARIABLES %(matchgroup)s.
DATASET ACTIVATE %(ds)s.
DELETE VARIABLES %(matchgroup)s.
DATASET COPY MatchedCohort.
DATASET ACTIVATE MatchedCohort.
SELECT IF COHORT EQ 1.
DATASET ACTIVATE %(tempdsname)s.
When I run it I get this message.

------------------------------
Cindy Gombaut
------------------------------
Original Message:
Sent: Fri July 15, 2022 11:00 PM
From: Jon Peck
Subject: Error Message while Propensity Score Matching
Paste and post the syntax or send me a syntax file to look at (
jkpeck@gmail.com)
--