## Looking at Many Independent Variables Individually

Solved
Occasional Contributor
Posts: 11

# Looking at Many Independent Variables Individually

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?

Accepted Solutions
Solution
‎08-07-2011 03:40 PM
Posts: 2,116

## Looking at Many Independent Variables Individually

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

All Replies
Solution
‎08-07-2011 03:40 PM
Posts: 2,116

## Looking at Many Independent Variables Individually

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

🔒 This topic is solved and locked.