|
|
Hi,
I have a dataset that includes a variable (mnthintrvl), which contains values 1-108. This represents groupings of approximately 30 days. I want to compute a new variable that combines mnthintrvl with another variable that indicates whether an event occurred (incident1) for all 108 categories.
I keep trying variations of the following syntax, but continue to get operator command errors. Can someone help me figure out what I'm missing?
Thanks for your help!
IF ((mnthintrvl = 1 & incident1 = 1) mnthlcrmrt = 1) ((mnthintrvl = 2 & incident1 = 1) mnthlcrmrt = 2) ((mnthintrvl = 3 & incident1 = 1) mnthlcrmrt = 3)....((mnthintrvl = 108 & incident1 = 1) mnthlcrmrt = 108)
EXECUTE .
|