BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sgupta
Calcite | Level 5

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?

1 ACCEPTED SOLUTION

Accepted Solutions
PGStats
Opal | Level 21

The variable name is educat. Educatf is the format name. Attached code misses a semicolon after "proc reg data=assig.depress2"

PG

View solution in original post

6 REPLIES 6
Reeza
Super User

Check your variable names. Run a proc contents and note the difference between the name and label. 

PGStats
Opal | Level 21

The attached code shows the variable name to be EDUCAT. "Education" is the variable label, it is only used for display purposes.

PG
sgupta
Calcite | Level 5
I tried educat,educatf and education but none worked?

##- Please type your reply above this line. Simple formatting, no
attachments. -##
sgupta
Calcite | Level 5

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

PGStats
Opal | Level 21

The variable name is educat. Educatf is the format name. Attached code misses a semicolon after "proc reg data=assig.depress2"

PG
sgupta
Calcite | Level 5

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: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 6319 views
  • 0 likes
  • 3 in conversation