Last active
December 13, 2017 11:16
-
-
Save Lu-Yi-Hsun/1acf6366d3d7bec943730a123516b6cd to your computer and use it in GitHub Desktop.
cow
This file contains 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
/*牛隻分析*/ | |
data a;input breed x1-x8; | |
cards; | |
1 2200 51.0 1128 70.9 7 0.25 54.8 1720 | |
1 2250 51.9 1108 72.1 7 0.25 55.3 1575 | |
1 1625 49.9 1011 71.6 6 0.15 53.1 1410 | |
1 4600 53.1 993 68.9 8 0.35 56.4 1595 | |
1 2150 51.2 996 68.6 7 0.25 55.0 1488 | |
1 1225 49.2 985 71.4 6 0.15 51.4 1500 | |
1 2250 51.0 959 72.1 7 0.20 54.0 1522 | |
1 4000 51.5 1060 69.3 7 0.30 55.6 1765 | |
1 1600 50.1 979 71.2 6 0.25 51.5 1365 | |
1 1525 49.6 1083 75.8 6 0.30 54.6 1640 | |
1 1850 50.6 1036 69.2 6 0.15 54.8 1570 | |
1 2850 51.1 870 70.9 7 0.15 52.9 1450 | |
1 2650 51.1 998 65.5 7 0.40 54.6 1505 | |
1 1550 50.2 973 69.5 6 0.40 53.0 1530 | |
1 2000 49.0 893 73.9 6 0.20 51.9 1470 | |
1 2300 49.6 975 68.2 6 0.50 52.9 1842 | |
1 1900 49.1 997 67.9 6 0.30 54.0 1500 | |
1 1400 48.4 946 68.6 5 0.20 51.2 1480 | |
1 1650 50.9 928 67.2 6 0.25 54.1 1480 | |
1 1500 49.5 963 69.4 6 0.35 53.1 1670 | |
1 1375 49.2 911 67.4 6 0.20 53.4 1490 | |
1 1500 48.1 1003 70.5 5 0.25 54.7 1748 | |
1 2400 51.1 915 64.9 7 0.25 54.6 1725 | |
1 1425 48.9 924 72.7 5 0.15 52.1 1374 | |
1 1525 49.4 959 68.4 6 0.15 52.6 1565 | |
1 1800 47.7 944 66.5 5 0.40 53.3 1556 | |
1 2500 50.6 897 67.2 6 0.30 54.9 1688 | |
1 1600 48.9 974 71.0 5 0.30 54.2 1722 | |
1 1300 49.9 872 70.7 6 0.20 53.3 1325 | |
1 1400 48.4 841 71.3 5 0.15 51.5 1365 | |
1 1300 48.6 920 71.4 5 0.15 52.9 1450 | |
1 1400 47.6 974 69.7 5 0.15 51.9 1570 | |
5 2000 50.5 1002 68.8 6 0.20 54.4 1735 | |
5 1300 50.2 998 68.7 6 0.15 52.9 1540 | |
5 1300 49.0 1015 69.8 6 0.30 51.9 1550 | |
5 1300 48.7 1056 72.9 5 0.15 52.6 1525 | |
5 1500 49.6 984 71.4 6 0.15 53.4 1650 | |
5 1225 48.9 934 66.0 5 0.20 52.1 1430 | |
5 2750 49.7 929 66.9 6 0.25 53.3 1688 | |
5 1500 49.9 919 67.1 6 0.20 54.3 1425 | |
5 1325 47.8 931 67.1 5 0.25 51.5 1520 | |
5 1800 49.6 952 69.4 6 0.25 52.3 1512 | |
5 1375 51.0 1002 72.1 7 0.25 51.9 1410 | |
5 975 48.6 936 65.3 5 0.35 51.4 1550 | |
5 1325 48.3 870 65.6 5 0.30 52.5 1588 | |
5 1850 50.1 853 67.9 6 0.15 52.9 1390 | |
5 1025 48.8 843 67.3 5 0.20 50.4 1390 | |
5 1000 47.7 913 68.2 5 0.15 49.4 1345 | |
5 975 47.2 844 70.6 5 0.15 50.1 1285 | |
8 1750 54.0 1252 76.5 8 0.15 56.9 1648 | |
8 1450 53.3 1383 81.4 8 0.20 59.6 1904 | |
8 1200 52.8 1076 74.0 7 0.15 55.5 1615 | |
8 2000 53.5 1175 74.5 8 0.10 57.4 1686 | |
8 1450 53.2 1027 71.2 8 0.10 56.9 1696 | |
8 1800 52.3 1116 71.1 7 0.10 57.5 1620 | |
8 1525 51.8 1095 71.1 7 0.15 54.6 1712 | |
8 1925 52.7 1141 78.5 7 0.15 55.6 1572 | |
8 3450 54.8 1039 70.6 8 0.10 58.7 1600 | |
8 1650 52.8 981 74.1 7 0.10 56.9 1750 | |
8 1900 52.4 933 71.5 7 0.10 56.2 1640 | |
8 1850 51.2 1083 74.5 7 0.20 55.9 1752 | |
8 1550 52.3 1143 77.7 7 0.10 56.1 1785 | |
8 1825 53.0 1055 76.8 8 0.10 56.7 1526 | |
8 1475 52.9 1037 75.0 7 0.10 55.5 1406 | |
8 2200 51.8 1076 74.5 7 0.15 55.8 1475 | |
8 1850 53.1 964 70.8 8 0.10 55.5 1535 | |
8 1550 51.2 1057 74.8 7 0.10 55.5 1520 | |
8 1250 50.8 1040 74.5 6 0.10 55.8 1516 | |
8 1350 52.7 1079 75.5 7 0.15 56.1 1595 | |
8 1725 51.4 1034 71.2 7 0.10 56.0 1655 | |
8 1750 50.7 1012 71.6 6 0.10 54.3 1480 | |
8 1450 51.4 997 73.4 7 0.10 55.2 1454 | |
8 1200 49.8 991 70.8 6 0.15 54.6 1475 | |
8 1425 50.0 928 70.8 6 0.10 53.9 1375 | |
8 1250 50.1 990 71.0 6 0.10 54.9 1564 | |
8 1500 51.7 992 70.6 7 0.15 55.1 1458 | |
_; | |
/*Prin1 越大 越肥, Prin2 越大骨架越大*/ | |
proc princomp n=2 out=aout; | |
var x2-x8; | |
id breed; | |
proc print; | |
proc plot; | |
plot prin2*prin1=breed; | |
proc sort;by breed; | |
/*可以分類*/ | |
proc means; | |
var prin1 prin2; | |
by breed; | |
/* Prin1 跟 Prin1 的值 可以 分出*/ | |
/*相關係數矩陣 從這裡去思考到底Prin1 Prin2 是什麼意義*/ | |
proc corr; | |
var x2-x8; | |
with prin1 prin2; | |
run; |
This file contains 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
/*牛隻分析*/ | |
data a;input breed x1-x8; | |
cards; | |
1 2200 51.0 1128 70.9 7 0.25 54.8 1720 | |
1 2250 51.9 1108 72.1 7 0.25 55.3 1575 | |
1 1625 49.9 1011 71.6 6 0.15 53.1 1410 | |
1 4600 53.1 993 68.9 8 0.35 56.4 1595 | |
1 2150 51.2 996 68.6 7 0.25 55.0 1488 | |
1 1225 49.2 985 71.4 6 0.15 51.4 1500 | |
1 2250 51.0 959 72.1 7 0.20 54.0 1522 | |
1 4000 51.5 1060 69.3 7 0.30 55.6 1765 | |
1 1600 50.1 979 71.2 6 0.25 51.5 1365 | |
1 1525 49.6 1083 75.8 6 0.30 54.6 1640 | |
1 1850 50.6 1036 69.2 6 0.15 54.8 1570 | |
1 2850 51.1 870 70.9 7 0.15 52.9 1450 | |
1 2650 51.1 998 65.5 7 0.40 54.6 1505 | |
1 1550 50.2 973 69.5 6 0.40 53.0 1530 | |
1 2000 49.0 893 73.9 6 0.20 51.9 1470 | |
1 2300 49.6 975 68.2 6 0.50 52.9 1842 | |
1 1900 49.1 997 67.9 6 0.30 54.0 1500 | |
1 1400 48.4 946 68.6 5 0.20 51.2 1480 | |
1 1650 50.9 928 67.2 6 0.25 54.1 1480 | |
1 1500 49.5 963 69.4 6 0.35 53.1 1670 | |
1 1375 49.2 911 67.4 6 0.20 53.4 1490 | |
1 1500 48.1 1003 70.5 5 0.25 54.7 1748 | |
1 2400 51.1 915 64.9 7 0.25 54.6 1725 | |
1 1425 48.9 924 72.7 5 0.15 52.1 1374 | |
1 1525 49.4 959 68.4 6 0.15 52.6 1565 | |
1 1800 47.7 944 66.5 5 0.40 53.3 1556 | |
1 2500 50.6 897 67.2 6 0.30 54.9 1688 | |
1 1600 48.9 974 71.0 5 0.30 54.2 1722 | |
1 1300 49.9 872 70.7 6 0.20 53.3 1325 | |
1 1400 48.4 841 71.3 5 0.15 51.5 1365 | |
1 1300 48.6 920 71.4 5 0.15 52.9 1450 | |
1 1400 47.6 974 69.7 5 0.15 51.9 1570 | |
5 2000 50.5 1002 68.8 6 0.20 54.4 1735 | |
5 1300 50.2 998 68.7 6 0.15 52.9 1540 | |
5 1300 49.0 1015 69.8 6 0.30 51.9 1550 | |
5 1300 48.7 1056 72.9 5 0.15 52.6 1525 | |
5 1500 49.6 984 71.4 6 0.15 53.4 1650 | |
5 1225 48.9 934 66.0 5 0.20 52.1 1430 | |
5 2750 49.7 929 66.9 6 0.25 53.3 1688 | |
5 1500 49.9 919 67.1 6 0.20 54.3 1425 | |
5 1325 47.8 931 67.1 5 0.25 51.5 1520 | |
5 1800 49.6 952 69.4 6 0.25 52.3 1512 | |
5 1375 51.0 1002 72.1 7 0.25 51.9 1410 | |
5 975 48.6 936 65.3 5 0.35 51.4 1550 | |
5 1325 48.3 870 65.6 5 0.30 52.5 1588 | |
5 1850 50.1 853 67.9 6 0.15 52.9 1390 | |
5 1025 48.8 843 67.3 5 0.20 50.4 1390 | |
5 1000 47.7 913 68.2 5 0.15 49.4 1345 | |
5 975 47.2 844 70.6 5 0.15 50.1 1285 | |
8 1750 54.0 1252 76.5 8 0.15 56.9 1648 | |
8 1450 53.3 1383 81.4 8 0.20 59.6 1904 | |
8 1200 52.8 1076 74.0 7 0.15 55.5 1615 | |
8 2000 53.5 1175 74.5 8 0.10 57.4 1686 | |
8 1450 53.2 1027 71.2 8 0.10 56.9 1696 | |
8 1800 52.3 1116 71.1 7 0.10 57.5 1620 | |
8 1525 51.8 1095 71.1 7 0.15 54.6 1712 | |
8 1925 52.7 1141 78.5 7 0.15 55.6 1572 | |
8 3450 54.8 1039 70.6 8 0.10 58.7 1600 | |
8 1650 52.8 981 74.1 7 0.10 56.9 1750 | |
8 1900 52.4 933 71.5 7 0.10 56.2 1640 | |
8 1850 51.2 1083 74.5 7 0.20 55.9 1752 | |
8 1550 52.3 1143 77.7 7 0.10 56.1 1785 | |
8 1825 53.0 1055 76.8 8 0.10 56.7 1526 | |
8 1475 52.9 1037 75.0 7 0.10 55.5 1406 | |
8 2200 51.8 1076 74.5 7 0.15 55.8 1475 | |
8 1850 53.1 964 70.8 8 0.10 55.5 1535 | |
8 1550 51.2 1057 74.8 7 0.10 55.5 1520 | |
8 1250 50.8 1040 74.5 6 0.10 55.8 1516 | |
8 1350 52.7 1079 75.5 7 0.15 56.1 1595 | |
8 1725 51.4 1034 71.2 7 0.10 56.0 1655 | |
8 1750 50.7 1012 71.6 6 0.10 54.3 1480 | |
8 1450 51.4 997 73.4 7 0.10 55.2 1454 | |
8 1200 49.8 991 70.8 6 0.15 54.6 1475 | |
8 1425 50.0 928 70.8 6 0.10 53.9 1375 | |
8 1250 50.1 990 71.0 6 0.10 54.9 1564 | |
8 1500 51.7 992 70.6 7 0.15 55.1 1458 | |
_; | |
/*Prin1 越大 越肥, Prin2 越大骨架越大*/ | |
data a; set a; | |
retain i 0;i=i+1; | |
/**if i=16 or i=51 then delete; | |
*/ | |
proc princomp n=2 out=aout; | |
var x2-x8; | |
id breed; | |
proc print; | |
proc plot; | |
plot prin2*prin1=breed; | |
proc sort;by breed; | |
/*跟 princomp 很像*/ | |
proc factor method=prin n=2 rotate=varimax reorder round preplot plot out=aout; | |
var x2-x8; | |
/*可以分類*/ | |
proc means; | |
var prin1 prin2; | |
by breed; | |
symbol1 c=red v=trianglefilled i=none; | |
symbol2 c=greed v=trianglefilled i=none; | |
symbol3 c=purple v=trianglefilled i=none; | |
/* Prin1 跟 Prin1 的值 可以 分出*/ | |
/*相關係數矩陣 從這裡去思考到底Prin1 Prin2 是什麼意義*/ | |
proc corr; | |
var x2-x8; | |
with prin1 prin2; | |
proc gplot; | |
plot pin2*prin1=breed/overlay; | |
run; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment