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

Hi,

I am trying to do a preliminary narrowing of a set of variables, to create a set from which to do model selection and multiple regression. Many of the initial, big set of variables are intercorrelated, so my statistician suggested I look for the highest correlations of independent with response in order to choose which of the set to keep for further use. Basically trying to complete this step...

"We initially evaluated each variable by itself in univariate framework, before important (P < 0.25) variables were analyzed together in a multivariate framework." (John R. Squires et al. 2006)

Is there a macro or some other piece of code to look at the individual relationship of each explanatory variable with the response variable?

1 ACCEPTED SOLUTION

Accepted Solutions
Doc_Duke
Rhodochrosite | Level 12

PROC CORR is the functional equivalent of a univariate regression (in terms of the Pearson correlation p-value).  You can do

PROC CORR RANK;

  VAR <independent variables>;

  WITH OUTCOME;

  RUN;

and then scan the p-values.  The RANK option will order them from highest to lowest correlation, which will correspond to lowest-to-highest p-value.

Doc Muhlbaier

Duke

View solution in original post

1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12

PROC CORR is the functional equivalent of a univariate regression (in terms of the Pearson correlation p-value).  You can do

PROC CORR RANK;

  VAR <independent variables>;

  WITH OUTCOME;

  RUN;

and then scan the p-values.  The RANK option will order them from highest to lowest correlation, which will correspond to lowest-to-highest p-value.

Doc Muhlbaier

Duke

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
  • 1 reply
  • 1142 views
  • 0 likes
  • 2 in conversation