proc glmselect

Reply
Occasional Contributor
Posts: 18

proc glmselect

I was doing elastic net logistic regression by using the following code in E guide. But kept giving me error "ERROR 22-322: Syntax error, expecting one of the following: BACKWARD, FORWARD, LAR, LASSO, NONE, STEPWISE.  " Does anyone know why?

proc glmselect data=work.train1 valdata=work.valid1 plots=coefficients;

     class Children StudentMaritalStatus PellEligFlag sex startingGPA degree school Income Military  / param=ref;

model Success =

        AttendUniqDaysSum VisitsSum PageSum  highlightSum PostSum

       children studentmaritalstatus PellEligFlag sex startingGPA degree school Income military/

       selection=elasticnet(steps=120 L2=0.001 choose=validate);

run;

Super User
Posts: 19,194

Re: proc glmselect

What version of SAS do you have?

ElasticNet is a newer option.

Occasional Contributor
Posts: 18

Re: proc glmselect

6.1

SAS Super FREQ
Posts: 3,637

Re: proc glmselect

6.1 is not a valid SAS version.  Start SAS and then submit the following statement:

%put SYSVLONG = &SYSVLONG;

Occasional Contributor
Posts: 18

Re: proc glmselect

It is SAS enterprise guide 6.1

SAS Super FREQ
Posts: 3,637

Re: proc glmselect

Yes, but the important issue is what version of SAS is running.  EG 6.1 can run with many versions of SAS. Submit the %PUT statement and copy/paste the string that appears in the SAS Log.  Almost surely your SAS version is old enough that it doesn't include the elastic net option.

Occasional Contributor
Posts: 18

Re: proc glmselect

SYSVLONG = 9.04.01M0P061913

Super User
Posts: 19,194

Re: proc glmselect

SAS 9.0 definitely doesn't support that selection method.

SAS Super FREQ
Posts: 3,637

Re: proc glmselect

You are running he original SAS 9.4, which corresponds to SAS/STAT 12.3. (see How old is your version of SAS? Release dates for SAS software - The DO Loop )

Ask a Question
Discussion stats
  • 8 replies
  • 471 views
  • 0 likes
  • 3 in conversation