Source code for statsmodels.sandbox.tests.datamlw

import numpy as np
from numpy import array


[docs]class Holder(object): pass
data = Holder() data.comment = 'generated data, divide by 1000' data.name = 'data' data.xo = array([[ -419, -731, -1306, -1294], [ 6, 529, -200, -437], [ -27, -833, -6, -564], [ -304, -273, -502, -739], [ 1377, -912, 927, 280], [ -375, -517, -514, 49], [ 247, -504, 123, -259], [ 712, 534, -773, 286], [ 195, -1080, 3256, -178], [ -854, 75, -706, -1084], [-1219, -612, -15, -203], [ 550, -628, -483, -2686], [ -365, 1376, -1266, 317], [ -489, 544, -195, 431], [ -656, 854, 840, -723], [ 16, -1385, -880, -460], [ 258, -2252, 96, 54], [ 2049, -750, -1115, 381], [ -65, 280, -777, 416], [ 755, 82, -806, 1027], [ -39, -170, -2134, 743], [ -859, 780, 746, -133], [ 762, 252, -450, -459], [ -941, -202, 49, -202], [ -54, 115, 455, 388], [-1348, 1246, 1430, -480], [ 229, -535, -1831, 1524], [ -651, -167, 2116, 483], [-1249, -1373, 888, -1092], [ -75, -2162, 486, -496], [ 2436, -1627, -1069, 162], [ -63, 560, -601, 587], [ -60, 1051, -277, 1323], [ 1329, -1294, 68, 5], [ 1532, -633, -923, 696], [ 669, 895, -1762, -375], [ 1129, -548, 2064, 609], [ 1320, 573, 2119, 270], [ -213, -412, -2517, 1685], [ 73, -979, 1312, -1220], [-1360, -2107, -237, 1522], [ -645, 205, -543, -169], [ -212, 1072, 543, -128], [ -352, -129, -605, -904], [ 511, 85, 167, -1914], [ 1515, 1862, 942, 1622], [ -465, 623, -495, -89], [-1396, -979, 1758, 128], [ -255, -47, 980, 501], [-1282, -58, -49, -610], [ -889, -1177, -492, 494], [ 1415, 1146, 696, -722], [ 1237, -224, -1609, -64], [ -528, -1625, 231, 883], [ -327, 1636, -476, -361], [ -781, 793, 1882, 234], [ -506, -561, 1988, -810], [-1233, 1467, -261, 2164], [ 53, 1069, 824, 2123], [-1200, -441, -321, 339], [ 1606, 298, -995, 1292], [-1740, -672, -1628, -129], [-1450, -354, 224, -657], [-2556, 1006, -706, -1453], [ -717, -463, 345, -1821], [ 1056, -38, -420, -455], [ -523, 565, 425, 1138], [-1030, -187, 683, 78], [ -214, -312, -1171, -528], [ 819, 736, -265, 423], [ 1339, 351, 1142, 579], [ -387, -126, -1573, 2346], [ 969, 2, 327, -134], [ 163, 227, 90, 2021], [ 1022, -1076, 174, 304], [ 1042, 1317, 311, 880], [ 2018, -840, 295, 2651], [ -277, 566, 1147, -189], [ 20, 467, 1262, 263], [ -663, 1061, -1552, -1159], [ 1830, 391, 2534, -199], [ -487, 752, -1061, 351], [-2138, -556, -367, -457], [ -868, -411, -559, 726], [ 1770, 819, -892, -363], [ 553, -736, -169, -490], [ 388, -503, 809, -821], [ -516, -1452, -192, 483], [ 493, 2904, 1318, 2591], [ 175, 584, -1001, 1675], [ 1316, -1596, -460, 1500], [ 1212, 214, -644, -696], [ -501, 338, 1197, -841], [ -587, -469, -1101, 24], [-1205, 1910, 659, 1232], [ -150, 398, 594, 394], [ 34, -663, 235, -334], [-1580, 647, 239, -351], [-2177, -345, 1215, -1494], [ 1923, 329, -152, 1128]]) princomp1 = Holder() princomp1.comment = 'mlab.princomp(x, nout=3)' princomp1.factors = array([[-0.83487832815382, -1.75681522344645, -0.50882660928949, -0.59661466511045], [-0.18695786699253, -0.10732909330422, 0.23971799542554, -0.75468286946853], [-0.57403949255604, -0.39667006607544, -0.7927838094217 , 0.02652621881328], [-0.60828125251513, -0.75979035898754, -0.20148864200404, -0.40278856050237], [ 0.55997928601548, 0.88869370546643, -1.55474410845786, 0.23033958281961], [-0.18023239851961, -0.72398923145328, -0.07056264751117, 0.29292391015376], [-0.189029743271 , -0.05888596186903, -0.63882208368513, -0.05682951829677], [ 0.94694345324739, -0.33448036234864, 0.16665867708366, -0.67190948646953], [-1.355171899399 , 2.58899695901774, -1.53157119606928, 0.93743278678908], [-1.06797676403358, -1.01894055566289, 0.29181722134698, -0.65261957826524], [-1.08919199915725, -0.5395876105009 , 0.18846579824378, 0.61935728909742], [-1.36598849770841, -1.00986627679465, -1.6090477073157 , -1.82708847399443], [ 0.561511276285 , -0.74919011595195, 1.49872898209738, -0.80588545345232], [ 0.04805787176428, -0.05522267212748, 0.82943784435024, 0.01537039050312], [-1.12006939155398, 0.73462770352006, 0.58868274831601, -0.67786987413505], [-0.26087838474316, -1.33362289066951, -1.02932517860259, 0.24865839951801], [-0.24666198784909, -0.58247196399204, -1.78971960966265, 1.18908143657302], [ 1.80675592845666, -0.73341258204636, -1.45012544705912, -0.44875329121288], [ 0.4794281391435 , -0.57169295903913, 0.48557628591056, -0.11638075289238], [ 1.39425263398653, -0.3665732682294 , 0.06937942447187, 0.06683559082703], [ 1.11015707065101, -1.87631329249852, 0.48914958604867, 0.11096926802212], [-0.85159530389901, 0.68543874135386, 0.86736021483251, -0.17641002537865], [ 0.34109015314112, -0.25431311542374, -0.36804227540019, -0.95824474920131], [-0.86253950274987, -0.28796613689709, 0.30820634958709, 0.27228599921917], [ 0.01266190412089, 0.48559962017667, 0.14020630700546, 0.18517398749337], [-1.56345869427724, 1.27917754070516, 1.25640847929385, -0.36055181722313], [ 1.62834293379132, -1.51923809467869, 0.27754976407182, 0.79362967384835], [-0.94400458067084, 1.77733054371289, 0.03595731772774, 0.96570688640992], [-2.11906234438329, -0.13226430948321, -0.78992396115366, 0.66362103473975], [-0.94372331181891, -0.37502966791165, -1.77907324401749, 0.97801542954941], [ 1.76575198740032, -0.92309597844861, -2.3872195277998 , -0.21817018301121], [ 0.57418226616373, -0.2925257318724 , 0.71180507312941, -0.13937750314467], [ 1.01654397566275, 0.28855305878842, 1.25119859389106, 0.11257524396004], [ 0.58979013567212, -0.06866577243092, -1.74447546690995, 0.13917953157575], [ 1.62072087150051, -0.5835145063711 , -0.99029357957459, -0.06334029436682], [ 0.893493925425 , -1.23995040005948, 0.40058503790479, -1.49029669097391], [ 0.26990527585623, 2.03399854143898, -1.2335089890881 , 0.54010061879979], [ 0.33504096277444, 2.42394994177782, -0.6643863358332 , -0.42471161848557], [ 1.69952476943058, -2.1707037237448 , 0.79694026483866, 0.88177267205969], [-1.41498253257895, 0.65248089992094, -1.40045976465378, -0.12045332880702], [-0.22640706265253, -0.94114558124915, -0.18868114063537, 2.67652245892778], [-0.37493712386529, -0.61985213642068, 0.5383582946365 , -0.17931524703276], [-0.30437796317839, 0.74252786648649, 0.73255373596822, -0.64993745548429], [-0.68788283675831, -0.84714762684627, -0.10721753874211, -0.59777382822281], [-1.00667616522842, -0.06670525233919, -0.92973707141688, -1.60742284256649], [ 1.95220512266515, 2.05751265066695, 0.79640648143073, -0.59608004229343], [-0.15504464969388, -0.3882079443045 , 0.75049869361395, -0.44163703260023], [-1.6686863460652 , 0.96325894557423, -0.16453379247258, 1.4560996746313 ], [-0.25573631707529, 0.88265554068571, 0.08984550855664, 0.53561910563178], [-1.29430028690793, -0.48042359291447, 0.49318558750269, 0.03689178852848], [-0.34391235307349, -0.95154811896716, -0.09714022474353, 1.19792361047367], [ 0.34367523316975, 1.16641214447854, -0.39528838072965, -1.72565643987406], [ 1.23887392116229, -1.27474554996132, -0.65859544264097, -0.81757560038832], [-0.17739006831099, -0.29057501559843, -0.62533324788504, 1.7092669546224 ], [-0.08610919021307, -0.06524996994257, 1.3018284944661 , -1.28219607271255], [-0.95717735853496, 1.79841555744597, 0.75799149339397, 0.23542916575208], [-1.70175078442029, 1.33831900642462, -0.73979048943944, 0.26157699746442], [ 0.84631686421106, 0.32029666775009, 2.51638540556813, 0.90367536744335], [ 1.22693220256582, 1.45665385966518, 1.27480662666555, 0.78786331120259], [-0.59251239046609, -0.660398245535 , 0.53258334042042, 0.81248748854679], [ 2.22723057510913, -0.22856960444805, -0.15586801032885, -0.26957090658609], [-0.83192612439183, -2.11983096548132, 0.75319973501664, 0.62196293266702], [-1.577627210601 , -0.3747136286972 , 0.31736538266249, 0.30187577548949], [-2.28230005998543, -1.17283119424281, 1.83780755209602, -0.75928026219594], [-1.90574204329052, -0.34197417196464, -0.59978910354131, -0.68240235236779], [ 0.48132729275936, -0.2524965456322 , -0.75271273075 , -0.89651237903089], [ 0.26961427953002, 0.62968227134995, 0.99324664633985, 0.59917742452108], [-0.95910506784013, 0.31907970712369, 0.35568397653203, 0.60155535679072], [-0.18528259973205, -1.31831013869974, -0.09749195643548, -0.39885348684496], [ 0.9608404103702 , 0.23727553971573, 0.20695289013955, -0.65281918968052], [ 0.85302395609555, 1.5303724004181 , -0.56440186223081, -0.27348033453255], [ 1.72786301913767, -1.14859994931789, 1.16222121440674, 1.39284961909257], [ 0.37711527308989, 0.47231886947072, -0.69423676772182, -0.53515102147655], [ 1.35642227654922, 0.53204130038923, 0.69844068787197, 1.04544871561741], [ 0.57797880484094, 0.08044525072063, -1.32634695941334, 0.35179408060132], [ 1.29437232500619, 1.07461562326311, 0.54545226737269, -0.6836610122092 ], [ 2.74736726573105, 0.90881277479338, -0.98342785084735, 1.38171127911719], [-0.67749479829901, 1.10093727650063, 0.28416704607992, -0.24984509303044], [-0.24513961858774, 1.32098977907584, 0.16904762754153, 0.00886790270539], [-0.5392290825383 , -1.43851802284774, 1.0064737206577 , -1.52649870396689], [ 0.19486366400459, 2.77236000318994, -1.32201258472682, -0.75922390642504], [ 0.33271229220962, -0.78464273816827, 1.09930224781861, -0.32184679755027], [-1.72814706427698, -1.09275114767838, 0.7451569579997 , 0.72871211772761], [-0.035506207751 , -0.72161367235521, 0.52828318684787, 0.87177739169758], [ 1.31224955134141, -0.22742530984642, -0.44682270809773, -1.72769462581607], [-0.07125058353119, -0.36850925227739, -1.01188688859296, -0.24962251325969], [-0.69840680770104, 0.4925285516285 , -1.0255829922787 , -0.36214090052941], [-0.2530614593082 , -0.68595709316063, -0.56882710610856, 1.25787365685572], [ 1.93782484285419, 2.67095706598253, 2.4023579082791 , -0.09112046819432], [ 1.57782156817208, -0.39819017512275, 1.01938038947667, 0.39718992194809], [ 1.6839282738726 , -0.37808442385434, -1.36566197748227, 1.22029200163339], [ 0.54652714502605, -0.38206797548206, -0.70554510441189, -1.31224358889695], [-1.30026063006148, 0.90642495630747, 0.02711437433058, -0.44482098905042], [-0.1239033493518 , -1.29112252171673, 0.18092802221218, 0.22673242779457], [ 0.01152882540055, 1.13242883415094, 2.34980443084773, 0.17712319903618], [-0.0505195424414 , 0.6807219067402 , 0.37771832345982, 0.0842510459176 ], [-0.44230076745505, -0.07002728477811, -0.6716520563439 , 0.09637247949641], [-1.31245480585229, -0.01674966464909, 1.21063252882651, -0.03927111631335], [-2.94268586886381, 0.20925236551048, 0.30321714445262, 0.22027672852006], [ 2.04121905977187, 0.58496246543101, -0.5192457175416 , -0.37212298770116]]) princomp1.values = array([[ 1.29489288337888], [ 1.12722515391348], [ 0.94682423958163], [ 0.65890241090379]]) princomp1.name = 'princomp1' princomp1.coef = array([[ 0.65989917631713, 0.22621848650964, -0.5882833472413 , -0.40899997165748], [ 0.15824945056105, 0.3189419948895 , 0.71689623797385, -0.5994104597619 ], [-0.3488766362785 , 0.90294049788532, -0.17151017930575, 0.1832151967827 ], [ 0.64635538301471, 0.17832458477678, 0.33251578268108, 0.66321815082225]]) princomp2 = Holder() princomp2.comment = 'mlab.princomp(x[:20,], nout=3)' princomp2.factors = array([[ 0.74592631465403, -0.92093638563647, 1.10020213969681, -0.20234362115983], [ 0.40379773814409, -0.23694214086306, -0.53526599590626, 0.48048423978257], [-0.43826559396565, -0.26267383420164, 0.35939862515391, -0.15176605914773], [ 0.29427656853499, -0.56363285386285, 0.19525662206552, -0.0384830001072 ], [-1.4327917748351 , 1.18414191887856, 0.05435949672922, 0.46861687286613], [ 0.23033214569426, -0.00452237842477, 0.00346120473054, -0.61483888402985], [-0.40976419499281, 0.10137131352284, 0.02570805136468, 0.06798926306103], [ 0.83201287149759, 0.82736894861103, -0.35298970920805, 0.49344802383821], [-3.36634598435507, -0.18324521714611, -1.12118215528184, 0.2057949493723 ], [ 0.70198992281665, -1.1856449495675 , 0.02465727900177, -0.08333428418838], [-0.13789069679894, -0.79430992968357, -0.33106496391047, -1.01808298459082], [-0.10779840884825, -1.41970796854378, 1.55590290358904, 1.34014813517248], [ 1.8229340670437 , 0.13065838030104, -1.06152350166072, 0.11456488463131], [ 0.51650051521229, 0.07999783864926, -1.08601194413786, -0.28255247881905], [-0.24654203558433, -1.02895891025197, -1.34475655787845, 0.52240852619949], [ 0.03542169335227, -0.01198903021187, 1.12649412049726, -0.60518306798831], [-1.23945075955452, 0.48778599927278, 1.11522465483282, -0.994827967694 ], [ 0.30661562766349, 1.91993049714024, 1.08834307939522, 0.61608892787963], [ 0.8241280516035 , 0.43533554216801, -0.48261931874702, -0.22391158066897], [ 0.6649139327178 , 1.44597315984982, -0.33359403032613, -0.094219894409 ]]) princomp2.values = array([[ 1.16965204468073], [ 0.77687367815155], [ 0.72297937656591], [ 0.32548581375971]]) princomp2.name = 'princomp2' princomp2.coef = array([[-0.13957162231397, 0.6561182967648 , 0.32256106777669, 0.66781951188167], [ 0.49534264552989, -0.08241251099014, -0.6919444767593 , 0.51870674049413], [-0.85614372781797, -0.11427402995055, -0.47665923729502, 0.16357058078438], [ 0.04661912785591, 0.74138950947638, -0.43584764555793, -0.50813884128056]]) princomp3 = Holder() princomp3.comment = 'mlab.princomp(x[:20,]-x[:20,].mean(0), nout=3)' princomp3.factors = array([[ 0.74592631465403, -0.92093638563647, 1.10020213969681, -0.20234362115983], [ 0.40379773814409, -0.23694214086306, -0.53526599590626, 0.48048423978257], [-0.43826559396565, -0.26267383420164, 0.35939862515391, -0.15176605914773], [ 0.29427656853499, -0.56363285386285, 0.19525662206552, -0.0384830001072 ], [-1.4327917748351 , 1.18414191887856, 0.05435949672922, 0.46861687286613], [ 0.23033214569426, -0.00452237842477, 0.00346120473054, -0.61483888402985], [-0.40976419499281, 0.10137131352284, 0.02570805136468, 0.06798926306103], [ 0.83201287149759, 0.82736894861103, -0.35298970920805, 0.49344802383821], [-3.36634598435507, -0.18324521714611, -1.12118215528184, 0.2057949493723 ], [ 0.70198992281665, -1.1856449495675 , 0.02465727900177, -0.08333428418838], [-0.13789069679894, -0.79430992968357, -0.33106496391047, -1.01808298459082], [-0.10779840884825, -1.41970796854378, 1.55590290358904, 1.34014813517248], [ 1.8229340670437 , 0.13065838030104, -1.06152350166072, 0.11456488463131], [ 0.51650051521229, 0.07999783864926, -1.08601194413786, -0.28255247881905], [-0.24654203558433, -1.02895891025197, -1.34475655787845, 0.52240852619949], [ 0.03542169335227, -0.01198903021187, 1.12649412049726, -0.60518306798831], [-1.23945075955452, 0.48778599927278, 1.11522465483282, -0.994827967694 ], [ 0.30661562766349, 1.91993049714024, 1.08834307939522, 0.61608892787963], [ 0.8241280516035 , 0.43533554216801, -0.48261931874702, -0.22391158066897], [ 0.6649139327178 , 1.44597315984982, -0.33359403032613, -0.094219894409 ]]) princomp3.values = array([[ 1.16965204468073], [ 0.77687367815155], [ 0.72297937656591], [ 0.32548581375971]]) princomp3.name = 'princomp3' princomp3.coef = array([[-0.13957162231397, 0.6561182967648 , 0.32256106777669, 0.66781951188167], [ 0.49534264552989, -0.08241251099014, -0.6919444767593 , 0.51870674049413], [-0.85614372781797, -0.11427402995055, -0.47665923729502, 0.16357058078438], [ 0.04661912785591, 0.74138950947638, -0.43584764555793, -0.50813884128056]])