# These data come from Lawson 1990 - New index for clustering tendency...
# Figure 4. A screenshot of this figure was saved and then uploaded to
# https://apps.automeris.io/wpd/. Points were then manually identified.
# We identified 295 points. The text suggested there should be 143*2=186 points
# but it was sometimes difficult to tell if there were multiple points or just
# pixelation that made it appear that there were multiple points.
# Also, the paper was not clear if there were 143 points or 286 points. For
# example "the data set was composed of 143 points".
lawson <- matrix(c(0.47355355848536385, 1.2260016012355097,
0.543569712961954, 1.1769009934292498,
0.06714766897061408, 1.1244889547911525,
0.14079502764263085, 1.028286914873962,
0.5434157480091146, 1.0334317129903785,
0.5567609563829132, 1.022753651338074,
0.7091720475443773, 1.0594825830107966,
0.92188528900406, 1.0106875364186332,
0.9618072169295123, 0.9957837289837841,
1.0572086390919382, 0.9553027898449455,
1.0513105970524004, 0.8439411238020343,
0.9761046393193328, 0.8416387555841904,
0.9539526356431235, 0.8458739761330638,
0.8898226797481606, 0.8414539976407833,
0.8981178376688285, 0.9249835375935042,
0.8474752116425929, 0.8884725255463388,
0.8006177547646233, 0.948329361827114,
0.8345421556040874, 0.83705296868116,
1.056758587691331, 0.6897772008697837,
1.236911794662864, 0.5466940171588018,
1.1155163510779915, 0.5036075172796052,
1.0113507700616333, 0.5312217237442383,
0.9910131841373461, 0.595418003003501,
1.0039036037273732, 0.653261451439454,
0.962295167395434, 0.5889325254515912,
0.9201466693827661, 0.6059728926935339,
0.882877676029315, 0.5545012246135481,
0.8776428676327771, 0.6765456896919281,
0.8640986891660783, 0.7172019120078452,
0.8331825266359368, 0.708570399882513,
0.8458597639835707, 0.7985333061723366,
0.8303448341205285, 0.8027827388707027,
0.7952455622563209, 0.7577396997446552,
0.7535092165789462, 0.7126824484691148,
0.7783994277241136, 0.6292239692638582,
0.7365351727013035, 0.6034383927006401,
0.6945572204825498, 0.5947831936594864,
0.6898198373182619, 0.6418822570788348,
0.6984987232752372, 0.6675967728945886,
0.6738074822229697, 0.7210770914362326,
0.6978449643985655, 0.7660964436464587,
0.7021417709285743, 0.7853775931251097,
0.6924964588060846, 0.9052712862469031,
0.6811504261276157, 0.9480735431362426,
0.6366048122338183, 0.9929460364683758,
0.6103265478215144, 0.9522045412555015,
0.626523660860214, 0.8451728434247492,
0.5865733086357757, 0.8643592452401143,
0.5643786685110879, 0.8750183573597617,
0.5553160545178055, 0.9071188656809752,
0.829747923841828, -0.1072827791384594,
0.8361007546651381, -0.06444262318380578,
0.904499092791124, -0.03645890083235792,
0.8512888050898445, -0.019442220506236785,
0.8711431779313742, -0.010834395296725807,
0.85101877424948, 0.021242426108666113,
0.886203319010645, 0.05343768209316546,
0.885890651721802, 0.1005462202788423,
0.8833940507942223, 0.14336742670083913,
0.9139406974375494, 0.20767266577288046,
0.9826374907028858, 0.19068914712890894,
1.0048463429770664, 0.17788873781900372,
0.9980387233699849, 0.20357009195260733,
0.9737169982045318, 0.20137668354754212,
1.0087309971717824, 0.2592675058151379,
1.0281874298275118, 0.32783165235187406,
1.0123598326756267, 0.379189623235917,
0.9263479039448189, 0.338320218677607,
0.948400422574578, 0.34907407846054006,
0.8930914741315191, 0.34895564388143285,
0.9344156674736009, 0.45611051367445654,
0.8638333957088783, 0.4238394595593288,
0.8477784041651072, 0.5094581854875005,
0.8190319631242092, 0.5072553023161068,
0.801077280931559, 0.5457607526754371,
0.7545040670434465, 0.5627916451510516,
0.7236589652607693, 0.5434536470744292,
0.7238152989051908, 0.5198993779815907,
0.7152358979946657, 0.47919578183403055,
0.6996356952346662, 0.49629299767394497,
0.7513868689213453, 0.3657828288809828,
0.7024733877500747, 0.40208065868575527,
0.6669051149526023, 0.4277004268382232,
0.6248134655379062, 0.4361756053191339,
0.6313084178561447, 0.45760278937120724,
0.6510775178007172, 0.4790583977222662,
0.6709034663432613, 0.49194881731229323,
0.796088816459564, 0.2973560664560112,
0.7586208530132127, 0.27586255903963786,
0.7166855372429376, 0.26078346842770994,
0.709622098944985, 0.32500817198595844,
0.7768313538967345, 0.19881375925566247,
0.7590756417969843, 0.20734104895138028,
0.7661248679454443, 0.1452576425833898,
0.7460288885625358, 0.17305186960826568,
0.7239763699327765, 0.1622980098253326,
0.7307555652408723, 0.14089925007224524,
0.7731740940939044, 0.08317423621539954,
0.7555178670406041, 0.0767124455793109,
0.6914731840425984, 0.0594446839454823,
0.6670946102791738, 0.06581646430144916,
0.6095590917488998, 0.06783458952943588,
0.6423038841804564, 0.13428586317489954,
0.6907199401194767, 0.17293343502915848,
0.6927191158148059, 0.2050576302661935,
0.7367578297100247, -0.09677526328006936,
0.7571522642322833, -0.1695367313003644,
0.8527952929360879, -0.24641972267358958,
0.8683102227991301, -0.25066915537195555,
0.517009574251375, 0.011961892489826598,
0.5717784610137053, 0.09344962029873938,
0.5273039078673722, 0.12761562767958234,
0.5008835219601396, 0.10828710436928857,
0.533344071401839, 0.21756432181991303,
0.6837275625689881, 0.22645165263611688,
0.6813588709868442, 0.2500011843457912,
0.674423342034327, 0.2949542131917172,
0.5964507525333157, 0.3761576980107729,
0.5874734114369904, 0.39541042319043807,
0.6028746441040898, 0.40829136801413646,
0.5495506592068673, 0.4424384258623223,
0.4988369724331674, 0.41663389976644716,
0.5779417965104435, 0.49817373879016713,
0.5733749591400702, 0.5195772359264191,
0.6021782487789394, 0.5132149303367807,
0.6150260319204878, 0.5774822703435079,
0.605792872133291, 0.6352783449478178,
0.6100470422148213, 0.6609833859972429,
0.6389213926011549, 0.6439145944563143,
0.5807321151942091, 0.744432390436171,
0.5562682685338273, 0.7636519539336862,
0.5229407779730633, 0.7849938650888023,
0.5028732228891405, 0.8085054977331623,
0.5055261574611416, 0.7421300222183271,
0.485543875274176, 0.7527938717211389,
0.41681865770985416, 0.7740599847456263,
0.37001804942985594, 0.8253516322653693,
0.349964706495426, 0.8467219677194713,
0.30119334681908416, 0.8616068256216632,
0.2748013852108372, 0.8379957079308533,
0.2971807832789325, 0.7994997323378513,
0.3237859271295721, 0.7909913921747906,
0.36841681392032677, 0.7332711157011091,
0.3995035222443827, 0.7162070615433448,
0.4436654081018727, 0.7291495923481788,
0.43935438942237093, 0.7120097400597859,
0.4307181399138744, 0.679871332673258,
0.441694656705529, 0.6927428027306278,
0.592092360022171, 0.6994888363565736,
0.5678416956041822, 0.686588942000218,
0.5526110087309972, 0.6480124308934232,
0.5305584901012379, 0.6372585711104901,
0.5215953611544055, 0.6543699990998972,
0.5550791853595911, 0.6094738188519426,
0.19053281348448747, 0.867793848034223,
0.11976578377635766, 0.8633596573924497,
0.07098021195052279, 0.8803858124848998,
0.04453140174430453, 0.8653398835551219,
0.020238100877837117, 0.8588638807695406,
-0.2882129169489357, 0.6654839000033163,
-0.1209880286327438, 0.13693406036373634,
-0.09164467731314568, 0.04920246154429231,
-0.006836043906067124, -0.06196497178888305,
0.08375693434460679, -0.044640361557083175,
0.3694211391511557, -0.0847138857437928,
0.39579888860990964, -0.05896147086272485,
0.37340527839232174, -0.018324198079464837,
0.40651958671069277, -0.007546651380710312,
0.35328087471042746, 0.013752623325927305,
0.3375243383060066, 0.05440410825868014,
0.45692060619554975, 0.06536641290084177,
0.40588003998351385, 0.08881172218090172,
0.43441329878201884, 0.12313406320616616,
0.39868869234012516, 0.1723081004514726,
0.4116643848271092, 0.21730376574587718,
0.3982623278553393, 0.23654701615921403,
0.39343967179409434, 0.2964938627201108,
0.45301700246817667, 0.32017604115838494,
0.4556841491896706, 0.2516592684532919,
0.4778361528658799, 0.24742404790441852,
0.5040859929791982, 0.29244813749780907,
0.5060283200765562, 0.33313752149587617,
0.5394552956837702, 0.29680653000895385,
0.5614225414165723, 0.32040817293343504,
0.4408893015676001, 0.48074964351191696,
0.4451576837986234, 0.504313387371084,
0.38773586246429204, 0.48920113507700624,
0.3676398830813836, 0.5169953621018823,
0.41174492034090204, 0.5385030816677485,
0.37399271390469335, 0.559835518056536,
0.32968870655227467, 0.5683059591542824,
0.35598118311407145, 0.6069061571768988,
0.3914499708650935, 0.596275469356237,
0.42890372216195216, 0.6199102739628685,
0.4818581911723602, 0.6414369430613918,
0.36897108775054843, 0.6497605252810453,
0.30699664119533654, 0.6539104729329613,
0.2848162132201415, 0.6624282878623508,
0.3029414412067063, 0.5982272712199237,
0.26747265345568416, 0.6088579590405853,
0.2828454618237978, 0.6260214982447996,
0.21634681434669112, 0.6451510514621934,
0.22632848067384537, 0.8079133248376262,
0.21763538256737747, 0.7843401062121307,
0.2090133452083739, 0.7500604016353447,
0.2114388853884891, 0.7179456811646384,
0.22912353674077512, 0.7201248774202107,
0.25806894787457313, 0.6923495999279919,
0.26907388896521334, 0.7009384756048455,
0.2665062272901695, 0.7544661679781324,
0.04318598492564679, 0.7347160175662169,
0.010014828009304255, 0.7325036596284946,
-0.02088712237134449, 0.7217308503129043,
0.10323231653299358, 0.6877353887259756,
0.10792706324880263, 0.6470602168774015,
0.024241189651660278, 0.5890651721801912,
-0.013042015851284006, 0.5397348012904633,
-0.04605683912320507, 0.5139681742599024,
-0.05206857835868617, 0.41973688573905554,
0.014643251360813347, 0.368487874667791,
0.058577742826417534, 0.4156911605167538,
0.06952583531908646, 0.4328452249546396,
0.08918123806771616, 0.47143121082776307,
0.048960855002913584, 0.5313022592580312,
0.14834641640650537, 0.5572110077835206,
0.1947490845007036, 0.5658756815910029,
0.19890376953578381, 0.6065698029722343,
0.18391468920397758, 0.5315912396310528,
0.17088214811902203, 0.4951607630976802,
0.14239152576899572, 0.4544145305016416,
0.11151799968733278, 0.4393591268055351,
0.1492275696750629, 0.42445058198752184,
0.18466793312709928, 0.4181024885473763,
0.21556988350774797, 0.4288752978629665,
0.21320119192560416, 0.45242482957264074,
0.18221396864799833, 0.45449980339859875,
0.20727472558708016, 0.3453457579102457,
0.22688749188723123, 0.3903556353541432,
0.2948878898274171, 0.4782956790328159,
0.3503531719148977, 0.45485984451908457,
0.32858489627499554, 0.40128004093099057,
0.30436265615599256, 0.3840975521941191,
0.39253009422655116, 0.4335368828966256,
0.4037197932605987, 0.41428889510012457,
0.43700464737288414, 0.39937087551578265,
0.45922771179655786, 0.3844291690156192,
0.5002155509339751, 0.20892807231141663,
0.5001587023360036, 0.2174932610724487,
0.2798182739818179, 0.08211779976976352,
0.2863132263000564, 0.10354498382183674,
0.2794203337960177, 0.1420741210969887,
0.26574824598388336, 0.202002018125228,
0.25455854694983593, 0.22125000592172905,
0.3162345383656975, 0.26206729926523176,
0.3427117728709015, 0.2728306338144937,
0.30711507577444375, 0.3027329963474775,
0.31356739164420355, 0.33058407197032513,
0.49825427430395997, 0.504427084567027,
0.3789669662271954, -0.18961849853377988,
0.0027382074689583646, -0.1711521789593866,
-0.17512210605105946, 0.29313505805663076,
0.11993159218710775, 0.17171119017277237,
0.1308654725302838, 0.1910065518009163,
0.24202343109713065, 0.10987412772932492,
0.24639129837460383, 0.11844879125668584,
0.6551658794714975, 0.19641190599136849,
0.6661566084126448, 0.20714207885848013,
0.63047463841923, 0.24989222453301263,
0.6127615627679581, 0.2519956226579565,
0.6480029561270945, 0.27562568988142344,
0.6347003842017747, 0.2798798599629536,
0.6500731925698883, 0.29704339916716826,
0.656454447692184, 0.33560096074130574,
0.6431092393183854, 0.3462790223936103,
0.44391175202641564, 0.3587004410503727,
0.452874880973248, 0.34158901306096545,
0.2499917095794626, 0.24265350305798083,
0.24546750865756772, 0.2576331086234587,
0.2506407310729698, 0.4782009313695301,
0.26165988431310316, 0.4846485098561256,
0.4848095808837114, 0.5300942265511378,
0.4736483061486496, 0.5450596199671226,
0.4979984556130884, 0.5429704339916719,
0.5399053470843774, 0.5623321189841157,
0.5265743508600719, 0.570868883446162,
0.5220217256391914, 0.5901310833921559,
0.5042091649414696, 0.607223561848906,
0.5240777499324922, 0.6136900898681588,
0.6663508411223807, 0.5112110172582869,
0.6728884298890979, 0.526214309739586,
0.6595432215152995, 0.5368923713918907,
0.6227384917119482, 0.7488049950968085,
0.611605641275872, 0.7594877941322774,
0.34077418315670793, 0.8980941507530071,
0.3450852018362097, 0.9152340030414001),
byrow=TRUE, ncol=2)
lawson <- round(lawson,2)
libs(clustertend)
set.seed(42)
out=NULL
for(k in 1:10){
out[k] <- 1-hopkins(lawson, n=14)$H
}
summary(out) # This is almost identical to Table 6.
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.5878 0.6531 0.6818 0.6853 0.7321 0.7608
# I think the results should be like this
set.seed(42)
out=NULL
for(k in 1:10){
out[k] <- hopkins2(lawson, m=14)[1]
}
summary(out)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.6977 0.7683 0.8422 0.8361 0.9136 0.9290
# This appears to confirm that Lawson et al used "distances", not "distances^2"
# when calculating Hopkins statistic.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.