Skip to content

Conversation

@paulvonhippel
Copy link
Contributor

Analysts may inadvertelntly include collinear variables in a regression. (Collinearity means that one variable is a constant plus a weighted sum of other variables.) To help users figure out which variables are collinear, the %collinear macro reports how much of the variance in each variable can be explained by the others (R2). If R2=1, then the variable in question is collinear with other variables.

The macro is invoked as follows:

%collinear (dataset=mydataset, vars=x1 x2 etc);

where mydataset is the dataset you are working with and x1 x2 etc is a list of variables including some that may be collinear.

Analysts may inadvertelntly include collinear variables in a regression. (Collinearity means that one variable is a constant plus a weighted sum of other variables.) To help users figure out which variables are collinear, the %collinear macro reports how much of the variance in each variable can be explained by the others (R2). If R2=1, then the variable in question is collinear with other variables.

The macro is invoked as follows:

 %collinear (dataset=mydataset, vars=x1 x2 etc);

 where mydataset is the dataset you are working with and x1 x2 etc is a list of variables including some that may be collinear.
@paulvonhippel
Copy link
Contributor Author

I'm an experienced SAS programmer wanting to add new SAS macros to this repository. Many of my macros pertain to statistical analysis.

@allanbowe allanbowe merged commit fc411c7 into sashub:master Jan 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants