01-28-2013 08:04 PM
sorry forgot to attach the code:
infile "F:\data\wvar.csv" DSD MISSOVER;
sig = 0;
y = symput('res');
_n_= _n_ +1;
sig2 = 0.0000624 + 0.1438*y*y + 0.634*sig*sig;
sig = sqrt(sig2);
PROC EXPORT DATA=test1
01-28-2013 08:17 PM
Can you explain what portion of your code is related to SAS/GRAPH or ODS GRAPHICS? This code is probably better posted in either the SAS Procedures forum or the Data Step and Macro Language forum. Since I do not see ANY graph procedures in your code, I don't understand why your posting is here.
Also, many folks do not have SAS 9.0 to test with. For help with older versions of SAS, you may want to work with SAS Tech Support. You also may want to look at the syntax for CALL SYMPUT (which is something that the folks in the Macro forum could help with). I believe you have coded at least one statement with SYMPUT incorrectly. Also, you are using the DO incorrectly and should be getting error messages in your log. What are those error messages?
I would suggest that you collect this information and repost your question in the correct forum and not in the graphics forum.
01-28-2013 09:41 PM
You need to explain your algorithm. Basically you should get rid of any attempt to loop over the data. The basic data step will take care of that for you. You should RETAIN the values that you want to carry forward (retain) to the next observation.
Your CSV file says the name of the variable is WVAR, so I have modified the code to use that name instead of RESIDUALS. (not sure why it would be plural anyway).
You do not define Y in your program. I have assumed it is yet another name for the data in the CSV file.
Perhaps you want something like this?
infile "F:\data\wvar.csv" DSD MISSOVER firstobs=2;
input wvar ;
retain sig 0;
sig2 = 0.0000624 + 0.1438*wvar*wvar + 0.634*sig*sig;
sig = sqrt(sig2);