Last active
August 29, 2015 14:20
-
-
Save daynebatten/7b9a8420d38cc129399d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* We need constraints for every combination of dimensions you can build by leaving out one dimension at a time. | |
| This is pretty simple in a 2-dimensional dataset. */ | |
| proc sql; | |
| create table | |
| levels | |
| /* Constraints across the degree dimension */ | |
| as select distinct | |
| county, | |
| 'dummy' as degree | |
| from | |
| testset | |
| /* And constraints across the county dimension */ | |
| union all | |
| select distinct | |
| 'dummy' as county, | |
| degree | |
| from | |
| testset; | |
| quit; | |
| /* Assign numbers to our soon-to-be constraints */ | |
| data levels; | |
| set levels; | |
| con = _n_; | |
| run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment