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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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