06-29-2015 11:28 AM
I have two arrays- call them probx and conditional- each with 31 elements. I've ran the program and verified that they all do exist, some are just very small. I have created a do loop to multiply these together and store in an array called num:
do i=1 to 31;
but no matter what I do this returns a missing value for each element. I've tried setting a single variable equal to conditional1*probx1 and got the same result. The only thing I could see which may make a difference is the conditional array has 6 observations, but I've tried restricting it to only one observation and still got missing values. I'm fairly new at SAS and so this could be something dumb I'm doing and just don't know it. Any help would be appreciated. Thanks!
06-29-2015 03:49 PM
And verify that ALL variables in the conditional and probx arrays are actually numeric, not character that look like numbers. (Though SAS Usually handles those with warnings you may have something else).
When you say "very small" how small? Any thing that results in numbers smaller than 1E-13 is exceeding SAS precision.
With the conditional array missing for all except 6 observations then the result will be missing for all except those six observations.
06-29-2015 04:36 PM
So I think I somewhat figured it out. To generate the conditional array I had two do loops, one from 1 to 6 to get the observations, and one from 1-31 to do the elements with an output statement in between. As soon as I removed the output statement, it worked. But even if I changed the first do loop from 1 to 1 so it only has one observation, but left the output statement there, it wouldn't work. So does the output do something to prohibit this from working?