I am trying to run forward selection on data deress2 :
proc reg data=assig.depress2;
model cesd=
age income education / selection=forward ;
run;
It gives me following error:
257 proc reg data=assig.depress2;
258 model cesd=
259 age income education / selection=forward ;
ERROR: Variable EDUCATION not found.
NOTE: The previous statement has been deleted.
260 run;
WARNING: No variables specified for an SSCP matrix. Execution terminating.
NOTE: PROCEDURE REG used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
can someone help to solve this?
The variable name is educat. Educatf is the format name. Attached code misses a semicolon after "proc reg data=assig.depress2"
Check your variable names. Run a proc contents and note the difference between the name and label.
The attached code shows the variable name to be EDUCAT. "Education" is the variable label, it is only used for display purposes.
After changing to educat foll is the error :
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
NOTE: The previous statement has been deleted.
49 run;
NOTE: PROCEDURE REG used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
The variable name is educat. Educatf is the format name. Attached code misses a semicolon after "proc reg data=assig.depress2"
Sorry following is the complete error :
66 proc reg data=assig.depress2
67 where sex=2;
-----
22
76
ERROR 22-322: Syntax error, expecting one of the following: ;, (, ADJRSQ, AIC, ALL, ALPHA,
ANNOTATE, BIC, C, CORR, COVOUT, CP, DATA, EDF, GMSEP, GOUT, GRAPHICS, JP, LACKFIT,
LINEPRINTER, LP, MSE, NOPRINT, OUTEST, OUTSEB, OUTSSCP, OUTSTB, OUTVIF, PC, PCOMIT,
PLOT, PLOTS, PRESS, RIDGE, RMSE, RSQUARE, SBC, SIMPLE, SINGULAR, SP, SSE, TABLEOUT,
USSCP.
ERROR 76-322: Syntax error, statement will be ignored.
68 model cesd=
ERROR: No data set open to look up variables.
69 age income educat / selection= forward sle=0.15;
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
ERROR: No data set open to look up variables.
NOTE: The previous statement has been deleted.
70 run;
NOTE: PROCEDURE REG used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
71 quit;
Some one please help.thanks
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.