Thank you. Fixing the 'a' allowed it to run through the loop. However, now I am having trouble graphing the results. I have stata 10 and tried to set it back to stata 7 as per one of the earlier post but it did not work. My "y axis" lines up at -1 to 1, the same as my x-axis. This is the code I used for the graph as p:
 
sort xaxis
graph plo phi xaxis, s(ii) c(||)
 
I get nothing when I include the s and c terms. If I exclude those terms, I just get the plo and the phi concentrated at the 1 value on the y axis. Thanks much. Amy