Counting post probation unit arrests: HELP PLEASE!!!

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

HilaryLiberty
Posts: 1
Joined: Wed Feb 26, 2014 3:06 am

Counting post probation unit arrests: HELP PLEASE!!!

Postby HilaryLiberty » Wed Feb 26, 2014 3:19 am

Trying to count the number of post probation unit arrests. All data are dates and there is missing data. There are 64 probation units 1-64 and 134 possible arrests 0=133.
Have the following code:

VECTOR Arrest=Arrest_Date.0 TO Arrest_Date.133.
DO REPEAT Unit= TO_DT.1 TO TO_DT.64.
Compute Post=0.
LOOP I = 0 TO 133.
if (Arrest(I) gt Unit) Post=Post +1.
END LOOP.
END REPEAT.
FREQUENCIES Post.

and get the following error message which repeats over and over in output:

The subscript in a vector reference is missing or otherwise invalid. The subscript must be a positive integer and must not be greater than the length of the vector. The result has been set to the system-missing value.
>Command line: 49 Current case: 1 Current splitfile group: 1

Any help would be greatly appreciated,
Hilary

Who is online

Users browsing this forum: No registered users and 1 guest

cron