1
votes

I want to make a plot between a variable and its observation number. From here http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_reg_sect017.htm I see that the keyword is OBS. so thus my code is

proc gplot data=my_data;
plot OBS.*my_v;
run;

by I still get an error. What's the proper way to do this?

1

1 Answers

1
votes

Your reference refers to proc reg not proc gplot. You may need to add the observation number in to the data set.

data my_data;
set my_data;
obs=_n_;
run;

proc gplot data=my_data;
plot OBS*my_v;
 run;