BookmarkSubscribeRSS Feed
HimaAalamuri
Fluorite | Level 6

Hi All,

could anyone knows please clarify my doubt,

i have one dept variable "depvar" and

10 covariates - covar1 covar2 covar3 covar4 covar5 covar6 covar7 covar8 covar9 covar10.

i have to display type3 with p-vlaues using proc glm by using forward selection method.

how can i start and select covariates by using forward seletion method ? in SAP i dn't have any info related to forward selection method so what should i do in this case?

please help me out from this!

and one more question what is ment by forwards selection method and why we have to use?? what is the purpose behind this?

Best Regards & Thanks in advance.

5 REPLIES 5
SteveDenham
Jade | Level 19

Forward selection is a widely discredited model building tool that leaves you with a model that fits your data, but has almost no relevance to anything else.  It is available in a wide variety of procedures, although not in PROC GLM.

If it is not in your analysis plan, work with whoever thinks this is a good idea, and convince them to try some other method.  LAR, LASSO and ELASTICNET are all available in PROC GLMSELECT.  Combined with model averaging, you may develop a decent model.

Read the following "Stopping stepwise: Why stepwise and similar selection methods are bad, and what you should use".  Here is the link:

http://www.nesug.org/proceedings/nesug07/sa/sa07.pdf

Steve Denham

HimaAalamuri
Fluorite | Level 6

Thank you so much SteveDenham! Smiley Happy

Proc Glmselect: i used following code to display type3 p-value.

proc glmselect data=<datasetname>;

model deptval=covar1 covar2 covar3 ......................... covar20/ selection=forward(select=SL choose=AIC);

run;

my problems are:

1) in my SAP they won't mention any selection methoeds for forward like "AIC/Rsequre etc..", i only consider "AIC" in my model is it correct or not?

2) but in output they mentioned like this "the SAS type 3 p-values will be used to test (two-side) whether the impact of ach covariate is statistically significant at % significance level.  note that a type 3 p-value for a covariate  is comuted adjusting for all other coavariates in the model.

so based on above points my code is correct or not? may i modify anything please suggest !

Thanks in advance.

SteveDenham
Jade | Level 19

The code is fine for forward selection.  My objection is to that particular methodology, which has been shown to lead to major problems.

Steve Denham

HimaAalamuri
Fluorite | Level 6

hi SteveDenham & paigemiller,

by using proc glmselect we get pvalue at 0.20 but i want at 0.05 then how can i get?

so i am using sle=0.05 & sls=0.05, i am sure sle=0.05 but what is the use of sls=0.05 option? please let me know both options need to include or only one (Sle=0.05)?

pls suggest!

PaigeMiller
Diamond | Level 26

Another alternative to forward selection is PROC PLS.

(and I agree with @SteveDenham that forward selection has been discredited, and I wish SAS would remove it from PROC REG, but I doubt they will)

--
Paige Miller

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1837 views
  • 4 likes
  • 3 in conversation