> Hello,
>
> I am trying to look at the effect of a drug on an
> outcome. The drug was used at different intervals
> through the observation period. I set up the data as
> below
>
> NODAT Duration RAS1 RAS2 RAS3 etc for use in months
> 1, 2, 3 etc
>
> and I used this syntax
>
> proc phreg data=_proj_.imported;
> model DURATION*NODAT(0) = cum AGE / risklimits;
> array cum (*) RAS1-RAS12;
> do i = 1 to 12;
> if DURATION=i then cum=RAS; end; run;
>
> and keep getting this error
> ERROR: The name cum is already defined as a variable
> and cannot be redeclared as an array by the ARRAY
> statement
>
> Thanks so much for any help,
I think it's in the last line. You have cum = RAS, shouldn't it be cum = ras
?
But what are you trying to do here? It's not clear to me.
Peter