Revision 4d048784cc1691d7539bc45fef9d3916724c6650 authored by Mitzi Morris on 27 August 2019, 15:59:25 UTC, committed by Mitzi Morris on 27 August 2019, 15:59:25 UTC
normal_mixture.data.R
N <-
1000
y <-
c(10.0787617156523, -9.51866467444093, 9.73922587306449, 11.5662681883816,
9.62798489000074, -9.60265090119919, 8.90114345923455, 10.866328444034,
10.5347883361026, 8.60577222463504, -10.625227428575, -9.08615131315038,
-8.99280046532217, 9.43533905966944, 8.92696803962787, 9.642301288006,
9.42066621557773, 9.90838406119759, 9.63911912487384, 7.55585122379505,
9.58069898235901, 9.63228461457187, -9.99589804304319, 8.61024296515084,
-10.4988882191036, -8.45028703711596, 9.76066425342707, -8.68129886943495,
9.83763492226261, 7.29698608457303, 8.78881675784227, 10.6057117460834,
10.2807363791435, 9.54352982843898, -10.9911972452721, 12.2061931600758,
7.76887153466896, 10.7523541087606, -9.98525551020183, 10.6248182699128,
10.9092322100956, 9.85276119502607, 10.9778885179292, 10.4521386035968,
10.9501292674525, 8.78767098907235, 10.4760680578381, -10.5254343756996,
10.1066471851771, 8.98960108796381, 11.1788924241439, 8.16177207287154,
8.78778163498527, 9.22771109933542, -10.1948463841928, -10.2952820080142,
-9.50335957628006, 9.99524569310745, 9.79654519990185, 10.6998634277736,
10.3014073262429, 8.33668631497077, -9.03423870378235, 9.64018036967314,
11.6691504372573, 10.9413492009848, -11.2272839144599, 10.8911157938285,
9.46898499012104, -9.5887646441991, 11.1152849920637, 10.1955967101101,
11.348570300012, 10.135897719167, 11.5544531837259, 9.86110328372943,
9.87931976177428, 10.752278211748, 10.3312880631571, 8.39765486915738,
9.22717521672948, 8.87715287722374, 10.3908345994533, 8.87861997541676,
9.93346546639017, 10.9956254670304, -9.28529380867817, 9.86324177715395,
-11.4437979353353, -9.19387673640779, -11.7398350783033, -10.4013203095,
-10.2875824887513, 9.8810095952169, 10.2244248320694, 8.87616842642094,
11.0817433200965, 11.2615426236089, 10.8182260738274, 10.5190581651096,
9.38550490079291, 12.827807696125, 11.5003104206829, -8.97369784173981,
9.16657709168524, 10.4418149946038, -9.36841324191389, -10.5804663984926,
10.1647431036369, 9.72644824357577, 10.476402714431, 10.7311506029696,
9.26382891181627, 11.3043847535379, 10.4198438027989, -9.91726516628864,
-10.483882474015, 11.1093058479695, -8.83241303607449, 10.0804581453455,
10.091011715105, 10.3553007042538, 8.45462629127872, 9.958942029534,
-9.18454036443283, 10.8157285063582, 9.65495165729484, 10.0482461316808,
-10.905640775072, -9.98443651907025, 8.73484067100771, 8.37862639984215,
-9.40580349855116, -10.2703152440041, 11.4642739554968, 11.5768548854893,
7.33318938830718, 10.0390903990974, 11.0785766571347, 8.47690794542766,
9.77532169953588, 9.71319992158507, 10.2670182524397, -10.6411181560584,
-9.53554022933489, 12.0048819880247, 11.068294112414, -10.0476112199953,
10.7297692474882, -10.0035802700059, 10.8842322392817, 9.90100942917067,
7.95811834440273, 12.0537464016876, 10.6148585771334, 11.7695557842842,
-10.1622575511924, 10.3283274641102, -9.21930070795023, -10.9812056220275,
-10.1415857318327, -11.2562489529667, 11.5359251228164, 8.79455692191044,
8.04628480806038, 9.57003526472078, 10.5390674610495, -10.010258765208,
9.71633254444569, 10.2646183028619, 9.28031810911545, 9.52545784204816,
9.87544219275188, 8.93741938562221, 11.9649315861451, 8.22806692774107,
10.9095230555518, 8.12095747854901, 8.69662320765811, 11.1747826075257,
10.1439847159912, -8.6921722382838, -11.804975773816, 10.3501059450885,
9.6551446251821, 10.3322565976428, -11.1729836028224, 8.50923696349623,
8.8578894891086, 10.2092991197477, 10.1621595029931, 10.0081847236298,
9.56129159516384, -10.4432066820666, 9.8736814248717, -9.93494898961266,
10.8181022046474, -8.36565834150681, 10.1723657998346, 10.1379422169029,
10.8148837226889, -9.62070693292343, -10.3107408759354, 10.6741558699236,
-11.6418647499083, -10.9885637415086, 10.1749081876493, 11.7678771112303,
-9.89794804171576, -10.2874581716328, 9.1653908620136, 11.7156318787535,
-10.6625885122872, 11.1781349786478, 10.3244312552014, 10.0642081984583,
11.5602518174107, 10.3443603035977, 8.75911725980491, 8.94722796805182,
9.56956921792536, -10.1309504794356, -9.5147885465912, 9.9283590779406,
12.2328395893027, 10.4175852097228, 11.1799855377854, 11.6944884582449,
-11.1979346263839, 10.5990249224701, 8.46531130904106, 8.09287304940918,
-10.4349607395643, 10.033450285969, 9.86348976236917, 11.2800118872818,
10.1429977591401, 9.16583583952832, 9.48731652641927, 8.09480196743456,
11.5068749881894, 8.32051497775634, 10.9777036311362, 11.1807577803244,
-9.44231502565423, 10.1904046840125, -10.9821472074464, 10.9878405188951,
-9.5521733916081, 9.26481707287272, 10.1825896458426, 10.8219756005116,
10.1008165456318, 10.7628687748061, 9.92090390936909, 10.6579628249169,
-9.61545628377418, -8.99519566101998, 9.39510546534214, 11.3911257928786,
9.68678677769843, 9.5660673490616, 10.7776928224029, -9.03554593315622,
12.5210794021992, 10.6033297904601, -10.5716501470052, -11.4702828897835,
8.26263836326742, 11.2634731903223, -9.97665531906082, -12.7159252945058,
-8.81471074857334, 10.983549854338, -10.0566727606766, -9.59343549056041,
-11.3094299496401, -10.7066912868769, -8.96610833006209, 11.0242007344117,
10.8491427937478, -9.26175745003045, 8.6636551180621, 10.3606786467136,
10.1390993506887, -10.3545920057504, -9.81176114667915, 8.94812420534452,
-7.84729915691064, -11.10973934267, -8.97049177792347, -8.62284525025174,
-9.08518894812402, 9.18235800538324, 9.59052674565536, 11.1088826236572,
12.0591150513961, -11.0780344933821, -11.222331968246, -10.711444696028,
9.81632041095048, 10.2374039921351, -8.62076386764043, 10.6788651818835,
8.53465451310903, 8.86231220324369, 9.01034391877219, -9.47201121730324,
10.2530108947054, -10.4620363576056, 9.41425920571156, -9.86297844816024,
-11.2996452388479, 11.1129580427685, 11.6065794209202, -9.19786212394995,
11.6345529259773, -11.3447009402143, 11.5155259028602, 9.86108612467055,
8.46155458966665, 9.0553374479857, 9.4210845900859, 10.6101411197351,
9.98698524477991, 8.57328785962276, 11.0265779119591, 10.2118052908858,
9.48822006918977, -9.709674325511, 11.4895755423417, 9.45484497569441,
-10.192610254954, 8.23195215241814, 10.6262098035123, -10.6548353134147,
10.7406569549298, 12.0080438835213, -9.4619354198813, 9.45842990534921,
8.40313954146295, 11.7578057914613, -9.04913262501355, 9.26991967711579,
11.4560385077095, 11.0485057783357, -9.79982269426772, 9.43726689016695,
-10.7568675398117, 9.62310645557329, 10.9180308553875, 9.78569200990921,
-11.1549186595196, 10.0163780919448, 8.8567674249699, 11.0701873119837,
-10.8284383814111, 9.34520294856411, -8.58355914738141, 9.04614723399203,
9.97518990138801, -10.466822252265, 10.7149245846268, 9.56415807741495,
-8.18057472663792, 8.3583809576127, 10.6741185263892, -9.48454403117852,
11.0283684209902, 9.39414416764448, 9.44591964129117, 9.71871039604545,
8.76829165382753, 11.3075424170342, -8.75164149425368, -10.2470782304074,
9.81658069941223, 9.9219367166906, 9.95871616032122, -10.1675238559485,
9.55277984251774, 11.9529156963614, 10.8645790877641, 11.0719248954016,
8.23682452502462, -10.2615184127485, -10.3031776240722, 9.1518989363774,
9.01113204653102, -11.441687373266, 7.95371933160899, -10.7424822395852,
-10.3909802469706, 9.82362803837905, 9.04852235837992, -8.50172736889872,
10.2821312885721, 8.05606153755322, 9.55880006007305, 11.5791596182345,
-10.5918842177335, 10.6690084835082, -9.91207574282835, 7.78213174559851,
11.4331784789297, 9.25405144119079, 10.4530454882073, 8.79853723396448,
10.600672571192, -7.40422816215119, 12.2912539439291, 9.28522123051661,
10.6514510506905, 8.06040110464455, 10.2065839057819, 12.1107919012356,
11.0899790630955, 10.4114337565411, 9.52050648746652, 9.82332624489799,
13.039033405787, 9.57909265060003, 9.44804501017956, 9.37477275170591,
-10.0180868587078, 10.3969627282485, 10.1736869695142, -8.93124104220478,
10.4419298185301, 8.73384842581038, 9.68372417466203, 10.0969584869323,
-9.51083893907219, 8.94918229985524, 9.76536158967986, -9.75804592353706,
9.37280013220421, 9.54544737524905, -10.6553786961537, 8.20866218170873,
6.95463607002023, -9.12229173302214, -10.3922309126349, 10.1911800674397,
10.8111189290201, -10.7508305957708, 9.895373124421, 9.304493817718,
10.0031444122566, -12.0565376308283, -10.1541745028097, 10.8459935212827,
9.37595699942702, 10.8847432961232, -8.87146124283177, -10.4196432682773,
9.4519118340132, 10.3304971854621, 9.24652569281063, 11.1651379599112,
-11.411214006235, -7.4348623691501, 9.72067399641766, -10.5655378187186,
10.1821841465586, -9.11928490265027, 11.5545470773444, 8.26222672814396,
-8.15659176705974, 11.1319957518819, 9.97556499011801, 9.10361465582959,
9.60994307716486, 8.92135187555881, 10.9645697062262, -10.747766705257,
-11.0374524778733, 8.94972532368806, 8.88611506234624, 11.3522464269832,
10.7886286987955, 7.7521198408217, -9.1523669054828, 12.5250783808459,
8.98359790096925, 8.27934666290151, 7.74804606379083, -10.7389817586684,
-10.0977651328538, 10.9297634008603, -9.04293634192005, -9.44066582532207,
10.9612816497933, -10.1939803095617, -9.91366506535345, 10.0022054778892,
9.65317642712795, 9.51413820146579, 10.2167373077816, 8.85151358441184,
-10.2868515649323, 10.0119293803061, 9.99071995497331, 9.69762244614936,
10.4923550217034, 9.39728038247446, 9.31772348034048, 10.2867372373666,
10.1655863562897, 9.15794606452223, 9.1778862812261, 8.57064917559631,
10.1347417193396, -9.38606645004695, 11.1205353766002, 10.922258127315,
-11.4034162929597, 10.7963936702143, 7.32613210003171, 9.77181002251055,
10.0528228618798, 10.1658214064877, 9.83561702641547, 12.2220580879628,
-10.3548551011225, 10.9045238862071, 8.70700033722994, 7.9219705200981,
10.7627920481292, 8.23133788739842, 7.90747212900534, 11.0409370394267,
-7.31593919592432, 9.12670771537337, -9.89974533325839, -12.3025125166977,
-8.82410513715091, 8.50745180007555, 9.86128675905982, -10.0026561459301,
9.96643873994312, 9.79259331981732, 9.80917563612823, 12.0569547005656,
9.34882661869191, -9.91442134449967, -9.61223097137049, 9.95007932522852,
11.7469087736797, 10.4001946875976, 10.5559784764237, 12.0789513191225,
9.31096813615993, -7.82775583217579, 9.40240583716087, 9.93255289266403,
8.88142505947862, -9.0766864110248, -10.9109119647925, 8.52931417680731,
8.66414238141873, 10.6497793290807, -11.6580335729395, 8.00698900123071,
9.66953768525166, 10.4132524628663, 8.91281566634883, -9.21143362031712,
9.35679234139273, -8.17615110803147, 10.2081246803034, -10.9715658969574,
13.023596733031, -11.2636561658954, -11.2782655062227, 9.53363135008856,
10.4197837527554, 9.58489244119664, 11.1685570711912, 10.793371128136,
10.3806972166891, 10.3350541573071, 10.4605243371586, 9.94626676685634,
-10.3400801867328, 10.222955609595, 8.27010830457434, -9.84308741184729,
9.57082901043481, 10.2216458443269, 10.6827977409369, 10.342167834879,
-11.0248281302695, 9.05151360161711, 9.77537449605376, 7.81716286622456,
11.0632011096347, 9.31694169760303, 9.35703856930842, 11.837217261589,
10.6948112203907, 8.9236093753546, 10.4592036913585, -10.1459458609891,
10.1386438855282, 11.232261753013, 11.8305096547063, 10.3184106728973,
10.7738538079572, 9.37037543376947, -10.4304860107623, 9.18693348678917,
11.2637648341454, 8.68434565720876, 9.18620197530073, 11.4599611446044,
10.4800031252848, -11.0945574088797, 10.2387376490566, 9.59364694537463,
-8.99327095928061, 8.83506298266456, -10.3840194426966, 10.2240609113397,
-10.5248893735639, 9.62760785759967, 10.079365063534, -10.7687001286491,
10.1637437699546, 9.80567102170068, 9.70754719843968, 10.6162073473761,
10.5610155839469, 7.82789601788298, 8.20523486136883, 10.5882338381721,
8.42742784923493, -10.9903876113961, -7.72292297951471, 9.88854076081528,
8.33821478475034, 9.32939312307841, 10.800619551179, 11.1011193106652,
-10.1099261000022, 10.8839234028016, -9.92532887825002, -9.91868157364112,
9.61565565992152, 10.1156170783244, 9.6928511660629, 9.31774783705032,
10.4354172738829, 10.2507752169853, 12.2559617446477, 9.36685785602739,
-10.4170817286227, -10.4898160137598, 9.12436733726013, 9.730982788654,
10.6828691425692, 11.4304351639013, 9.62265106404407, -11.6792916398537,
10.2603961417747, 11.2480384713198, 10.77884591054, 9.9690355475612,
-9.20629682555333, 9.33979133995686, 10.9270575621656, 11.0235867535727,
8.78292038932752, 10.1749863269549, 9.3466010679362, 12.0151338126491,
10.2235037117164, 8.71495972474863, -10.925763153064, -8.40638278001894,
-11.4159669203455, 10.3075336827178, 11.149452825723, -9.36604661013187,
12.5160741401274, 10.9221895473068, 8.20679689960437, 8.41288957698704,
9.95714952986613, -8.18851913715365, 10.3875227632695, -9.49964095054521,
8.29652826534535, 11.1452130604421, 9.61133393132873, 9.80245365211025,
12.5922520872747, 11.2871470933878, -9.81522553481041, 10.0062190534181,
9.33814985028829, 9.65318392302997, 11.3397324485649, 10.5924192662125,
10.7189040164074, 9.58858072236163, -8.93595486745599, 10.9020304830968,
10.2126174532676, 9.73654043085867, 9.16829715456166, 8.80933690601713,
8.65260186995893, -9.83420909356452, 10.47516319038, 9.4830670622285,
10.7032794934277, -10.5340316592913, -8.6873492038785, 10.0993895639375,
10.2610910117045, -10.3498244613826, 11.787849222301, 11.139568171058,
9.72299469820482, -11.1341460777791, 11.4917828432652, 9.96689142289024,
9.95304472516289, 8.08536614398298, -10.6508106381609, 10.0594483092865,
8.84993284847777, 10.0044806747115, -8.52480932841534, 10.6710460726635,
-10.4253298310742, -11.638931473249, 10.3838794238539, -10.7787002085694,
-10.4162764798642, 10.3147107148292, 9.29074853314924, 10.4294665746048,
-9.79715019185052, -9.59815986623741, 10.5650236905173, 8.69592570012447,
10.5924173589288, -8.59647478034163, 9.77059656716617, 9.19862131679224,
9.46815770373167, 10.535023231829, -12.0856331661877, 7.62977295513694,
-9.92902480043142, 11.8725972674065, -11.1169060701832, 8.6487521675505,
9.31377194553378, 10.8023045518987, -10.3808560779849, 8.38035043471661,
-8.73444373054514, -8.56892169012415, -9.82402964738205, 10.3314711584406,
10.1854736755025, 11.6740735050919, 9.69110524373521, 12.0127425725907,
9.00779168174289, -9.65400953289059, 9.36081029523745, 9.19222268307935,
9.56776982984306, -9.18473040611654, 8.6060744953505, -9.66827478102834,
12.6011743606045, 10.6376999884738, 9.76079732069272, 12.1453450842378,
11.0301708480568, 11.1364735782076, -10.2447515836444, 10.1083484588802,
-7.5382342225552, 9.09928083428771, -10.5175522522499, -9.55660613595525,
-9.67189486763083, 10.2248931038303, 11.550545940199, 11.7984204539083,
9.12713331251177, -10.4491599389868, 9.41473403924722, 10.0912250749375,
9.83068226118461, 10.8793515341339, -9.78210140158989, 10.514483942795,
10.3945842150078, -11.0409626304229, 10.5886728560102, 10.1584352541332,
9.47184598841611, 8.40935619443552, -9.90894751957456, 8.97688134622493,
11.211019935232, 10.7491856593976, 10.7873017495269, 10.1867756324757,
9.74078386314273, 9.25211168598903, 9.73027150108826, -10.7090076216278,
10.3994484560168, 9.81579127086072, 9.81191557692066, 9.96373020802345,
11.3183603457445, 9.62939867216113, -10.4711625257198, -11.6249314544619,
10.3882388392976, 10.9521395154248, 9.2405113327342, 10.4425275739611,
9.87650089222106, 9.29171319084941, 8.91139651258156, 8.57139819900797,
9.9961424501687, -9.85990550795364, 9.70758313674743, 9.5039304177794,
12.0663244126421, 11.6591804852706, -11.4953826937721, -9.2783573030316,
8.95086190617294, 11.2400894968428, 10.310778918788, -10.4179760516405,
9.13536125727828, 10.9592471554322, 10.962662147166, 9.04760635394027,
10.8004882586687, -10.2262244850898, 9.22893569923024, -10.4561314128423,
-10.6621156207949, -9.79050903429387, 9.47318635449212, -8.00116935967707,
-10.0570763312332, -9.19645984538819, -10.0441212740922, 11.4788232730563,
-9.43318866849756, -9.35091566403592, 8.52895033400044, 10.3534781327039,
10.8276184771636, 9.93337089247137, -11.0344276671851, 10.5590713711255,
8.99583556552668, 10.8999084829069, -11.1442773029976, 9.69869203817006,
-8.90585531136116, -11.5624306545703, 10.2447855556335, 10.0827199392685,
9.95961077092137, 10.7566861862841, 11.7205344292616, 9.77358643907095,
10.1095239104352, 10.5382421565052, 10.0772574025846, 9.53819581618213,
10.7659953598585, 11.6698787710747, 10.9089919455957, -10.4081150203207,
-9.24657759949556, -9.20335463377733, -10.7590681521328, 10.0616808307032,
-8.09562344190554, 11.2170830676925, -9.78116905663081, -8.85504543833859,
-10.1235456851063, 9.67787506856074, 8.89343949169863, -7.99575653561316,
-10.7719795703418, -11.1788890735806, -10.5696798739893, -8.24517915453391,
-11.7753693141591, -10.2097669134444, -11.2340440812683, 10.2859904417603,
9.6372472683742, 9.17954799125914, -8.33022093176597, -10.3953466788157,
10.4900275191026, -12.7678707807416, 11.1058750468863, 10.5081007688734,
8.76865008135527, 9.40406788245572, 11.0709345717393, 9.35359432240435,
-9.52410557964191, 9.66609177641322, 11.2851482151796, 9.8946909948377,
-9.97808771306627, 9.58070093523013, 8.7389504527192, 10.0852775370057,
10.1071144759014, -9.70645851904737, -10.7172305311259, 9.30759157963914,
6.96315753053229, 11.3145194333987, 10.354791246337, 10.47931719848,
11.6449389204673, -9.3834424140271, 10.7724131736268, -11.3673240394791,
11.049811963708, 9.15761537839109, 10.051498818984, 11.5409534253538,
11.0837643112649, 7.1387948180141, 9.80309472627036, -11.0768582653339,
-10.1153934052011, 10.203025940557, 10.6349590757828, 10.3643448423615,
-10.56952568002, 8.97628386871262, -7.63805118940883, 9.01328532413614,
-9.70228671644457, 10.8489734196045, 10.8097332205942, -8.78098406667269,
10.6881885521687, 9.99759635978347, -9.14677074634077, 11.1882650946775,
7.92936829043119, 8.28045282240367, 9.94656850295367, 9.42421871899151,
10.3022543508761, 9.42637476373473, 11.4966226812476, -9.40317552426524,
-9.63377150563604, -9.90684687612854, 9.52516052943005, 8.31384015076605,
11.8427680272746, -9.43061137227063, -9.74288461737338, 9.13603951857731,
9.53615106697376, -11.5305542491226, 9.62683068208445, 11.0372608634762,
9.66985167128222, 11.2747895360203, 9.6664620502666, -11.4198760101715,
9.21373329527328, 10.6594703226401, -9.85683654390669, -9.28952032750969,
10.7624268604215, 8.29988657732754, -10.6390998021297, -10.6627107313838
)
# To generate y (after loading):
# R> set.seed(seed)
# R> y <- ifelse(runif(N) < theta, rnorm(N, mu1, sd), rnorm(N, mu2, sd))
seed <-
0
theta <-
0.3
mu1 <-
-10
mu2 <-
10
sd <-
1
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...