Dear,
I have to set a multiple linear regression with continuous and categorical variables.
SAS uses the highest value of a categorical variable as the reference level. How can I change the reference level of a categorical variable?
Can I use CLASS statement with the REF OPTION (REF=FIRST) in the PROC REG or PROC GLM?
Thanks
PROC GLMSELECT allows it. I don't know about the others, but thought they didn't.
PROC GLMSELECT allows it. I don't know about the others, but thought they didn't.
Can you use PROC GLMSELECT to perform a standard linear regression? I'm running into the same problem with the reference group for my categorical variables. Thanks!
You can create the dummy variables in many different ways and use PROC REG.
But otherwise I think you can, this is from the documentation and I'm going to guess the first three sentences are what you need?
The GLMSELECT procedure compares most closely to REG and GLM. The REG procedure supports a variety of model-selection methods but does not support a CLASS statement. The GLM procedure supports a CLASS statement but does not include effect selection methods. The GLMSELECT procedure fills this gap. GLMSELECT focuses on the standard independently and identically distributed general linear model for univariate responses and offers great flexibility for and insight into the model selection algorithm. GLMSELECT provides results (displayed tables, output data sets, and macro variables) that make it easy to take the selected model and explore it in more detail in a subsequent procedure such as REG or GLM.
You can use the REF= option in the CLASS statement in PROC GLM. PROC REG does not have a CLASS statement. See this note on the topic for many procedures.
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.
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.