##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
##
## Attaching package: 'data.table'
## The following objects are masked from 'package:dplyr':
##
## between, first, last
##
## Attaching package: 'rstatix'
## The following objects are masked from 'package:effectsize':
##
## cohens_d, eta_squared
## The following object is masked from 'package:stats':
##
## filter
## Loading required package: viridisLite
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ forcats 1.0.0 ✔ purrr 1.0.2
## ✔ lubridate 1.9.3 ✔ tibble 3.2.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ data.table::between() masks dplyr::between()
## ✖ rstatix::filter() masks dplyr::filter(), stats::filter()
## ✖ data.table::first() masks dplyr::first()
## ✖ lubridate::hour() masks data.table::hour()
## ✖ lubridate::isoweek() masks data.table::isoweek()
## ✖ dplyr::lag() masks stats::lag()
## ✖ data.table::last() masks dplyr::last()
## ✖ lubridate::mday() masks data.table::mday()
## ✖ lubridate::minute() masks data.table::minute()
## ✖ lubridate::month() masks data.table::month()
## ✖ lubridate::quarter() masks data.table::quarter()
## ✖ lubridate::second() masks data.table::second()
## ✖ purrr::transpose() masks data.table::transpose()
## ✖ lubridate::wday() masks data.table::wday()
## ✖ lubridate::week() masks data.table::week()
## ✖ lubridate::yday() masks data.table::yday()
## ✖ lubridate::year() masks data.table::year()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
##
## Attaching package: 'gridExtra'
##
##
## The following object is masked from 'package:dplyr':
##
## combine
##
##
## Loading required package: spData
##
## To access larger datasets in this package, install the spDataLarge
## package with: `install.packages('spDataLarge',
## repos='https://nowosad.github.io/drat/', type='source')`
##
## Loading required package: sf
##
## Linking to GEOS 3.8.0, GDAL 3.0.4, PROJ 6.3.1; sf_use_s2() is TRUE
Data preparation
## [1] "ACB" "Algeria" "Amazonia" "Andes"
## [5] "Armenian" "ASW" "Balkan" "Bantu_SA"
## [9] "Baoan" "Basques" "Basters" "BEB"
## [13] "Bedouin" "Brahui" "Caucasus" "CEU"
## [17] "CHB" "CHS" "Colombian" "Coloured"
## [21] "Dai" "Dongxiang" "Druze" "ESN"
## [25] "Estonians" "Finnish" "French" "GBR"
## [29] "Gelao-Li-Zhuang" "GIH" "Greek" "Guizhou"
## [33] "GWD" "Han" "Hubei_Han" "Indian"
## [37] "IslandSEA" "Italy_C" "Italy_N" "Italy_S"
## [41] "ITU" "Japanese" "Kazakh" "Khoisan_SA"
## [45] "Khoisan_Tanzania" "KHV" "Kyrgyz" "Lithuanian"
## [49] "LWK" "Makrani" "Mansi-Khanty" "Maonan"
## [53] "Mesoamerica" "Miao" "Mizrahi_Jew" "Mongol"
## [57] "Morocco" "Mozabite" "MSL" "Mulam-Dong"
## [61] "MXL" "Nepal" "NWIndia" "Palestinian"
## [65] "Parsi" "PEL" "PJL" "PUR"
## [69] "RomGypsies" "Russian" "Salar" "Sardinian"
## [73] "SEAsian" "Sherpa" "Siberian" "Spanish"
## [77] "STU" "Sudan_Arab" "Sudan_Beja" "Sudan_Nilotic"
## [81] "Sudan_Nubian" "Tajiks" "Tibetan" "Tunisia_Arabs"
## [85] "Tunisia_Ber" "Ukrainian" "Yakuts" "Yoruba"
## [89] "Yuku"
## [1] 0.9769188
Heatmap of Fst distances
Distance matrix calculation
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## Warning: The melt generic in data.table has been passed a matrix and will
## attempt to redirect to the relevant reshape2 method; please note that reshape2
## is superseded and is no longer actively developed, and this redirection is now
## deprecated. To continue using melt methods from reshape2 while both libraries
## are attached, e.g. melt.list, you can prepend the namespace, i.e.
## reshape2::melt(distance_matrix). In the next version, this warning will become
## an error.
## POP1 POP2 EA3_distance EA3_Z_distance EA4_distance EA4_Z_distance
## 1 ACB Algeria 1.599180e-04 1.2862125 3.232018e-04 1.7498399
## 2 ACB Amazonia 3.500951e-05 0.2815798 2.955329e-04 1.6000380
## 3 ACB Andes 1.464641e-05 0.1178004 3.385128e-04 1.8327349
## 4 ACB Armenian 2.575620e-04 2.0718584 5.658617e-04 3.0636195
## 5 ACB ASW 1.404087e-05 0.1129300 9.539923e-05 0.5165365
## 6 ACB Balkan 2.390620e-04 1.9226649 5.845650e-04 3.1648803
## MIX_Height_distance MIX_Height_Z_distance SKINC_distance SKINC_Z_distance
## 1 4.846748e-05 1.31011166 0.0001736110 0.9453682
## 2 6.711583e-05 1.81379864 0.0001802110 0.9812199
## 3 3.734773e-05 1.00977029 0.0002237110 1.2183442
## 4 3.998726e-05 1.08106346 0.0003071116 1.6722799
## 5 1.440000e-05 0.38819430 0.0000420093 0.2287485
## 6 3.700000e-06 0.09936617 0.0005121702 2.7888625
## SIB_Height_distance SIB_Height_Z_distance EUR_Height_distance
## 1 0.0003421678 0.1153876 5.421902e-05
## 2 0.0111227311 3.7508646 5.519835e-05
## 3 0.0064500476 2.1751182 1.802951e-05
## 4 0.0004071518 0.1373018 5.078098e-05
## 5 0.0005342051 0.1801474 7.895209e-06
## 6 0.0007947628 0.2679991 3.244980e-06
## EUR_Height_Z_distance Height_2014_distance Height_2014_Z_distance
## 1 1.57290071 4.059060e-05 0.1256286
## 2 1.60131135 3.578594e-04 1.1062535
## 3 0.52303853 2.044094e-04 0.6318343
## 4 1.47316288 2.389364e-04 0.7388513
## 5 0.22904105 5.616905e-05 0.1737923
## 6 0.09413728 5.452433e-04 1.6858559
## GDP_distance Latitude_distance NIQ_seb_distance Height_distance
## 1 17874 14.50 1.84 3.3
## 2 NA 4.12 3.51 17.8
## 3 NA 3.00 3.51 19.3
## 4 15021 26.50 6.14 5.0
## 5 35124 NA 2.51 1.4
## 6 9008 29.00 5.99 1.7
## Skin_colour_J_distance Grams_protein_distance Infant_mortality_distance
## 1 5.9 14.40847 25.51
## 2 3.0 NA NA
## 3 2.9 NA NA
## 4 6.5 0.38149 22.55
## 5 2.0 16.18153 2.36
## 6 7.2 9.51653 0.87
## Wasting_distance Calories_distance HDI_distance BMI_distance
## 1 0.45 1530 0.064 2.50
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 3.90 170 0.023 2.00
## 5 6.30 3450 0.118 0.01
## 6 0.85 473 0.011 2.90
Permutation test
##
## Attaching package: 'ade4'
## The following object is masked from 'package:spdep':
##
## mstree
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.6-6.1
Correlogram
## Registered S3 method overwritten by 'ecodist':
## method from
## dim.dist proxy
##
## Attaching package: 'ecodist'
## The following object is masked from 'package:vegan':
##
## mantel
## [1] "Number of populations in Array2: 89"
## [1] "Number of populations in Fst: 116"
## [1] "Number of populations in merged_df: 86"
## [1] "Populations in Array2 but not in merged_df:"
## [1] "Algeria" "Amazonia" "Andes" "Armenian"
## [5] "Balkan" "Bantu_SA" "Baoan" "Basques"
## [9] "Basters" "Bedouin" "Brahui" "Caucasus"
## [13] "Colombian" "Coloured" "Dai" "Dongxiang"
## [17] "Druze" "Estonians" "Finnish" "French"
## [21] "Gelao-Li-Zhuang" "Greek" "Guizhou" "Han"
## [25] "Hubei_Han" "Indian" "IslandSEA" "Italy_C"
## [29] "Italy_N" "Italy_S" "Japanese" "Kazakh"
## [33] "Khoisan_SA" "Khoisan_Tanzania" "Kyrgyz" "Lithuanian"
## [37] "Makrani" "Mansi-Khanty" "Maonan" "Mesoamerica"
## [41] "Miao" "Mizrahi_Jew" "Mongol" "Morocco"
## [45] "Mozabite" "Mulam-Dong" "NWIndia" "Nepal"
## [49] "Palestinian" "Parsi" "RomGypsies" "Russian"
## [53] "SEAsian" "Salar" "Sardinian" "Sherpa"
## [57] "Siberian" "Spanish" "Sudan_Arab" "Sudan_Beja"
## [61] "Sudan_Nilotic" "Sudan_Nubian" "Tajiks" "Tibetan"
## [65] "Tunisia_Arabs" "Tunisia_Ber" "Ukrainian" "Yakuts"
## [69] "Yoruba" "Yuku"
## [1] "Populations in Fst but not in merged_df:"
## [1] "Adygei" "Amazonia" "Andes" "Armenian"
## [5] "Athabask" "Balearic" "Balkan" "Balochi"
## [9] "Bantu_SA" "Baoan" "Basques" "Basters"
## [13] "Bedouin" "Biaka" "Bonan" "Bougainville"
## [17] "Brahui" "Burusho" "Caucasus" "Colombian"
## [21] "Coloured" "Dai" "Dongxiang" "Druze"
## [25] "Estonians" "Finnish" "French" "Gelao-Li-Zhuang"
## [29] "Greek" "Guizhou" "Hazara" "Hubei_Han"
## [33] "Hui" "Indian" "Inuit" "IslandSEA"
## [37] "Italy_C" "Italy_N" "Italy_S" "Japanese"
## [41] "Kalash" "Karitiana" "Kazakh" "Khoisan_SA"
## [45] "Khoisan_Tanzania" "Korean" "Kyrgyz" "Lithuanian"
## [49] "Makrani" "Manchu" "Mandenka" "Mansi-Khanty"
## [53] "Maonan" "Mbuti" "Mesoamerica" "Miao"
## [57] "Mizrahi_Jew" "Mongol" "Mozabite" "Mulam-Dong"
## [61] "NWIndia" "Nepal" "Orcadian" "Palestinian"
## [65] "Parsi" "Pathan" "Pima" "Polish"
## [69] "RomGypsies" "Russian" "SEAsian" "Saami"
## [73] "Salar" "Sardinian" "Sherpa" "Siberian"
## [77] "Sindhi" "Spanish" "Sudan_Arab" "Sudan_Beja"
## [81] "Sudan_Copts" "Sudan_Gemar" "Sudan_Hausa" "Sudan_Nilotic"
## [85] "Sudan_Nuba" "Sudan_Nubian" "Sudan_Zaghawa" "Swedish"
## [89] "Tajiks" "Tibetan" "Tunisia_Arabs" "Tunisia_Ber"
## [93] "Ukrainian" "Uyghur" "Yakuts" "Yoruba"
## [97] "Yuku"
## [1] "ACB" "ASW" "Amazonia" "Andes"
## [5] "Armenian" "BEB" "Balkan" "Bantu_SA"
## [9] "Baoan" "Basques" "Basters" "Bedouin"
## [13] "Brahui" "CEU" "CHB" "CHS"
## [17] "Caucasus" "Colombian" "Coloured" "Dai"
## [21] "Dongxiang" "Druze" "ESN" "Estonians"
## [25] "Finnish" "French" "GBR" "GIH"
## [29] "GWD" "Gelao-Li-Zhuang" "Greek" "Guizhou"
## [33] "Hubei_Han" "ITU" "Indian" "IslandSEA"
## [37] "Italy_C" "Italy_N" "Italy_S" "Japanese"
## [41] "KHV" "Kazakh" "Khoisan_SA" "Khoisan_Tanzania"
## [45] "Kyrgyz" "LWK" "Lithuanian" "MSL"
## [49] "MXL" "Makrani" "Mansi-Khanty" "Maonan"
## [53] "Mesoamerica" "Miao" "Mizrahi_Jew" "Mongol"
## [57] "Mozabite" "Mulam-Dong" "NWIndia" "Nepal"
## [61] "PEL" "PJL" "PUR" "Palestinian"
## [65] "Parsi" "RomGypsies" "Russian" "SEAsian"
## [69] "STU" "Salar" "Sardinian" "Sherpa"
## [73] "Siberian" "Spanish" "Sudan_Arab" "Sudan_Beja"
## [77] "Sudan_Nilotic" "Sudan_Nubian" "Tajiks" "Tibetan"
## [81] "Tunisia_Arabs" "Tunisia_Ber" "Ukrainian" "Yakuts"
## [85] "Yoruba" "Yuku"
## [1] "Populations in Array2 but not in the intersection with Fst:"
## [1] "Algeria" "Han" "Morocco"
## [1] "Results for SIB_Height_distance"
##
## Mantel Correlogram Analysis
##
## Call:
##
## mantel.correlog(D.eco = phenotypic_distance, D.geo = genetic_distance)
##
## class.index n.dist Mantel.cor Pr(Mantel) Pr(corrected)
## D.cl.1 0.011542 1314.000000 0.307738 0.001 0.001 ***
## D.cl.2 0.034625 1102.000000 0.117399 0.001 0.002 **
## D.cl.3 0.057708 914.000000 0.010165 0.377 0.377
## D.cl.4 0.080792 984.000000 -0.140855 0.001 0.004 **
## D.cl.5 0.103875 834.000000 -0.093005 0.003 0.006 **
## D.cl.6 0.126959 676.000000 -0.068526 0.056 0.112
## D.cl.7 0.150042 318.000000 NA NA NA
## D.cl.8 0.173125 72.000000 NA NA NA
## D.cl.9 0.196209 544.000000 NA NA NA
## D.cl.10 0.219292 246.000000 NA NA NA
## D.cl.11 0.242376 176.000000 NA NA NA
## D.cl.12 0.265459 98.000000 NA NA NA
## D.cl.13 0.288542 32.000000 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [1] -2.220446e-16 2.308338e-02 4.616677e-02 6.925015e-02 9.233354e-02
## [6] 1.154169e-01 1.385003e-01 1.615837e-01 1.846671e-01 2.077505e-01
## [11] 2.308338e-01 2.539172e-01 2.770006e-01 3.000840e-01
## class.index n.dist Mantel.cor Pr(Mantel) Pr(corrected)
## D.cl.1 0.01154169 1314 0.30773814 0.001 0.001
## D.cl.2 0.03462508 1102 0.11739920 0.001 0.002
## D.cl.3 0.05770846 914 0.01016521 0.377 0.377
## D.cl.4 0.08079185 984 -0.14085464 0.001 0.004
## D.cl.5 0.10387523 834 -0.09300527 0.003 0.006
## D.cl.6 0.12695862 676 -0.06852637 0.056 0.112
## D.cl.7 0.15004200 318 NA NA NA
## D.cl.8 0.17312538 72 NA NA NA
## D.cl.9 0.19620877 544 NA NA NA
## D.cl.10 0.21929215 246 NA NA NA
## D.cl.11 0.24237554 176 NA NA NA
## D.cl.12 0.26545892 98 NA NA NA
## D.cl.13 0.28854231 32 NA NA NA
## [1] "Class 4 range for SIB_Height_distance : 0.0692501538461539"
## [2] "Class 4 range for SIB_Height_distance : 0.0923335384615385"
## [1] "Subset for class 4 range for SIB_Height_distance :"
## POP1 POP2 EA3_distance EA3_Z_distance EA4_distance EA4_Z_distance
## 1 ACB BEB 0.0001582868 1.273093 0.0004294011 2.324811
## 2 ACB CAUCASUS 0.0002105620 1.693389 0.0005417553 2.933106
## 3 ACB COLOMBIAN 0.0002112620 1.698794 0.0004862287 2.632480
## 4 ACB GREEK 0.0002359620 1.897787 0.0005620195 3.042818
## 5 ACB INDIAN 0.0001311450 1.054793 0.0004302617 2.329470
## 6 ACB MIZRAHI_JEW 0.0002998620 2.412074 0.0005797565 3.138847
## MIX_Height_distance MIX_Height_Z_distance SKINC_distance SKINC_Z_distance
## 1 3.677354e-05 0.9942615 4.123016e-05 0.2245059
## 2 1.355409e-05 0.3671107 4.084468e-04 2.2240690
## 3 3.336031e-05 0.9020713 3.706357e-04 2.0181806
## 4 4.644775e-05 1.2555595 3.916548e-04 2.1326332
## 5 3.166358e-05 0.8562432 1.855460e-05 0.1010332
## 6 6.333252e-05 1.7116125 3.830492e-04 2.0857742
## SIB_Height_distance SIB_Height_Z_distance EUR_Height_distance
## 1 0.0024482236 0.8256026 3.614284e-05
## 2 0.0022251118 0.7503637 1.774901e-05
## 3 0.0030350116 1.0234822 3.564696e-05
## 4 0.0004061278 0.1369565 5.634303e-05
## 5 0.0005333695 0.1798656 2.388263e-05
## 6 0.0020050748 0.6761616 7.511949e-05
## EUR_Height_Z_distance Height_2014_distance Height_2014_Z_distance
## 1 1.0485084 0.0001988881 0.61476424
## 2 0.5149011 0.0003872074 1.19725877
## 3 1.0341228 0.0001403391 0.43401972
## 4 1.6345187 0.0001559449 0.48226772
## 5 0.6928382 0.0000279000 0.08619389
## 6 2.1792261 0.0000429000 0.13248592
## GDP_distance Latitude_distance NIQ_seb_distance Height_distance
## 1 20950 10.00 4.79 12.6
## 2 14771 27.50 3.76 4.0
## 3 16269 7.25 0.04 6.4
## 4 370 24.75 10.08 0.7
## 5 20865 7.09 6.22 10.8
## 6 NA NA 10.51 5.3
## Skin_colour_J_distance Grams_protein_distance Infant_mortality_distance
## 1 3.1 42.64846 57.98
## 2 6.9 18.62857 22.59
## 3 3.6 27.75847 10.14
## 4 7.0 1.94855 5.71
## 5 2.6 37.62847 58.93
## 6 5.9 NA NA
## Wasting_distance Calories_distance HDI_distance BMI_distance HUDSON_FST
## 1 8.62 1650 0.139 7.7 0.0901526
## 2 3.70 510 0.005 1.5 0.0907699
## 3 5.45 660 0.051 2.8 0.0803569
## 4 6.10 1780 0.084 1.4 0.0876884
## 5 11.30 1770 0.165 6.8 0.0907498
## 6 NA NA NA NA 0.0895384
## WC_FST
## 1 0.0902271
## 2 0.0900105
## 3 0.0803462
## 4 0.0876695
## 5 0.0904115
## 6 0.0902992
## [1] "Results for MIX_Height_distance"
##
## Mantel Correlogram Analysis
##
## Call:
##
## mantel.correlog(D.eco = phenotypic_distance, D.geo = genetic_distance)
##
## class.index n.dist Mantel.cor Pr(Mantel) Pr(corrected)
## D.cl.1 0.011542 1314.000000 0.239664 0.001 0.001 ***
## D.cl.2 0.034625 1102.000000 0.140528 0.001 0.002 **
## D.cl.3 0.057708 914.000000 -0.040559 0.076 0.076 .
## D.cl.4 0.080792 984.000000 -0.150620 0.001 0.004 **
## D.cl.5 0.103875 834.000000 -0.067744 0.015 0.030 *
## D.cl.6 0.126959 676.000000 -0.043771 0.113 0.152
## D.cl.7 0.150042 318.000000 NA NA NA
## D.cl.8 0.173125 72.000000 NA NA NA
## D.cl.9 0.196209 544.000000 NA NA NA
## D.cl.10 0.219292 246.000000 NA NA NA
## D.cl.11 0.242376 176.000000 NA NA NA
## D.cl.12 0.265459 98.000000 NA NA NA
## D.cl.13 0.288542 32.000000 NA NA NA
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## [1] -2.220446e-16 2.308338e-02 4.616677e-02 6.925015e-02 9.233354e-02
## [6] 1.154169e-01 1.385003e-01 1.615837e-01 1.846671e-01 2.077505e-01
## [11] 2.308338e-01 2.539172e-01 2.770006e-01 3.000840e-01
## class.index n.dist Mantel.cor Pr(Mantel) Pr(corrected)
## D.cl.1 0.01154169 1314 0.23966402 0.001 0.001
## D.cl.2 0.03462508 1102 0.14052819 0.001 0.002
## D.cl.3 0.05770846 914 -0.04055930 0.076 0.076
## D.cl.4 0.08079185 984 -0.15062029 0.001 0.004
## D.cl.5 0.10387523 834 -0.06774444 0.015 0.030
## D.cl.6 0.12695862 676 -0.04377078 0.113 0.152
## D.cl.7 0.15004200 318 NA NA NA
## D.cl.8 0.17312538 72 NA NA NA
## D.cl.9 0.19620877 544 NA NA NA
## D.cl.10 0.21929215 246 NA NA NA
## D.cl.11 0.24237554 176 NA NA NA
## D.cl.12 0.26545892 98 NA NA NA
## D.cl.13 0.28854231 32 NA NA NA
## [1] "Class 4 range for MIX_Height_distance : 0.0692501538461539"
## [2] "Class 4 range for MIX_Height_distance : 0.0923335384615385"
## [1] "Subset for class 4 range for MIX_Height_distance :"
## POP1 POP2 EA3_distance EA3_Z_distance EA4_distance EA4_Z_distance
## 1 ACB BEB 0.0001582868 1.273093 0.0004294011 2.324811
## 2 ACB CAUCASUS 0.0002105620 1.693389 0.0005417553 2.933106
## 3 ACB COLOMBIAN 0.0002112620 1.698794 0.0004862287 2.632480
## 4 ACB GREEK 0.0002359620 1.897787 0.0005620195 3.042818
## 5 ACB INDIAN 0.0001311450 1.054793 0.0004302617 2.329470
## 6 ACB MIZRAHI_JEW 0.0002998620 2.412074 0.0005797565 3.138847
## MIX_Height_distance MIX_Height_Z_distance SKINC_distance SKINC_Z_distance
## 1 3.677354e-05 0.9942615 4.123016e-05 0.2245059
## 2 1.355409e-05 0.3671107 4.084468e-04 2.2240690
## 3 3.336031e-05 0.9020713 3.706357e-04 2.0181806
## 4 4.644775e-05 1.2555595 3.916548e-04 2.1326332
## 5 3.166358e-05 0.8562432 1.855460e-05 0.1010332
## 6 6.333252e-05 1.7116125 3.830492e-04 2.0857742
## SIB_Height_distance SIB_Height_Z_distance EUR_Height_distance
## 1 0.0024482236 0.8256026 3.614284e-05
## 2 0.0022251118 0.7503637 1.774901e-05
## 3 0.0030350116 1.0234822 3.564696e-05
## 4 0.0004061278 0.1369565 5.634303e-05
## 5 0.0005333695 0.1798656 2.388263e-05
## 6 0.0020050748 0.6761616 7.511949e-05
## EUR_Height_Z_distance Height_2014_distance Height_2014_Z_distance
## 1 1.0485084 0.0001988881 0.61476424
## 2 0.5149011 0.0003872074 1.19725877
## 3 1.0341228 0.0001403391 0.43401972
## 4 1.6345187 0.0001559449 0.48226772
## 5 0.6928382 0.0000279000 0.08619389
## 6 2.1792261 0.0000429000 0.13248592
## GDP_distance Latitude_distance NIQ_seb_distance Height_distance
## 1 20950 10.00 4.79 12.6
## 2 14771 27.50 3.76 4.0
## 3 16269 7.25 0.04 6.4
## 4 370 24.75 10.08 0.7
## 5 20865 7.09 6.22 10.8
## 6 NA NA 10.51 5.3
## Skin_colour_J_distance Grams_protein_distance Infant_mortality_distance
## 1 3.1 42.64846 57.98
## 2 6.9 18.62857 22.59
## 3 3.6 27.75847 10.14
## 4 7.0 1.94855 5.71
## 5 2.6 37.62847 58.93
## 6 5.9 NA NA
## Wasting_distance Calories_distance HDI_distance BMI_distance HUDSON_FST
## 1 8.62 1650 0.139 7.7 0.0901526
## 2 3.70 510 0.005 1.5 0.0907699
## 3 5.45 660 0.051 2.8 0.0803569
## 4 6.10 1780 0.084 1.4 0.0876884
## 5 11.30 1770 0.165 6.8 0.0907498
## 6 NA NA NA NA 0.0895384
## WC_FST
## 1 0.0902271
## 2 0.0900105
## 3 0.0803462
## 4 0.0876695
## 5 0.0904115
## 6 0.0902992
Moran’s I
## [1] "Results for MIX_Height with k = 1"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 2.2875, p-value = 0.02216
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.28564816 -0.01176471 0.01690374
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 1.6542, p-value = 0.09809
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.74785582 1.00000000 0.02323469
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.74786, observed rank = 34, p-value = 0.068
## alternative hypothesis: two.sided
##
## [1] "Results for MIX_Height with k = 2"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 2.9481, p-value = 0.003198
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.254285434 -0.011764706 0.008144322
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 1.4265, p-value = 0.1537
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.83963557 1.00000000 0.01263726
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.83964, observed rank = 82, p-value = 0.164
## alternative hypothesis: two.sided
##
## [1] "Results for MIX_Height with k = 3"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.3041, p-value = 0.0009527
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.231935985 -0.011764706 0.005439996
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 1.3619, p-value = 0.1732
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.869787757 1.000000000 0.009141897
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.86979, observed rank = 92, p-value = 0.184
## alternative hypothesis: two.sided
##
## [1] "Results for MIX_Height with k = 4"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 4.3972, p-value = 1.097e-05
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.272529831 -0.011764706 0.004180068
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 2.3162, p-value = 0.02055
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.800563571 1.000000000 0.007414302
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.80056, observed rank = 9, p-value = 0.018
## alternative hypothesis: two.sided
##
## [1] "Results for MIX_Height with k = 5"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 4.4523, p-value = 8.496e-06
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.242897434 -0.011764706 0.003271632
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 2.2736, p-value = 0.02299
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.822208985 1.000000000 0.006115161
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.82221, observed rank = 9, p-value = 0.018
## alternative hypothesis: two.sided
##
## [1] "Results for MIX_Height with k = 6"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.3949, p-value = 0.0006866
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.165086777 -0.011764706 0.002713727
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 1.8823, p-value = 0.0598
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.866526348 1.000000000 0.005028279
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.86653, observed rank = 25, p-value = 0.05
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 1"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 1.7805, p-value = 0.07499
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.21881422 -0.01176471 0.01677071
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 2.0195, p-value = 0.04344
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.67663540 1.00000000 0.02563971
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.67664, observed rank = 13, p-value = 0.026
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 2"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 2.6728, p-value = 0.007523
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.228496267 -0.011764706 0.008080536
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 2.7644, p-value = 0.005703
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.66896412 1.00000000 0.01434037
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.66896, observed rank = 2, p-value = 0.004
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 3"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.0542, p-value = 0.002256
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.21262383 -0.01176471 0.00539754
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 3.2932, p-value = 0.0009907
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.66184616 1.00000000 0.01054395
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.66185, observed rank = 1, p-value = 0.002
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 4"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.6184, p-value = 0.0002964
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.221265962 -0.011764706 0.004147528
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 3.8616, p-value = 0.0001126
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.641082247 1.000000000 0.008638682
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.64108, observed rank = 1, p-value = 0.002
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 5"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.9984, p-value = 6.377e-05
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.21604757 -0.01176471 0.00324623
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 3.9418, p-value = 8.086e-05
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.665727862 1.000000000 0.007191247
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.66573, observed rank = 1, p-value = 0.002
## alternative hypothesis: two.sided
##
## [1] "Results for SIB_Height with k = 6"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Moran I statistic standard deviate = 3.6643, p-value = 0.000248
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.178379082 -0.011764706 0.002692648
##
## Geary C test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
##
## Geary C statistic standard deviate = 3.7263, p-value = 0.0001943
## alternative hypothesis: two.sided
## sample estimates:
## Geary C statistic Expectation Variance
## 0.713678432 1.000000000 0.005904231
##
##
## Monte-Carlo simulation of Geary C
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_knn
## number of simulations + 1: 1000
##
## statistic = 0.71368, observed rank = 1, p-value = 0.002
## alternative hypothesis: two.sided
## [1] "Inverse Weighted Distances - Moran's I for MIX_Height"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_inv
##
## Moran I statistic standard deviate = 3.363, p-value = 0.000771
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.0905471175 -0.0117647059 0.0009255368
##
## [1] "Inverse Weighted Distances - Moran's I for SIB_Height"
##
## Moran I test under randomisation
##
## data: Array2_filtered_height[[height_col]]
## weights: weights_inv
##
## Moran I statistic standard deviate = 2.4855, p-value = 0.01294
## alternative hypothesis: two.sided
## sample estimates:
## Moran I statistic Expectation Variance
## 0.0635559181 -0.0117647059 0.0009183495
Tracts falling in the top-right quadrant represent “high-high” clusters, where neighborhoods with higher PGS are also surrounded by neighborhoods with high PGS. Statistically significant clusters - those with a p-value less than or equal to 0.05 - are colored red on the chart. The bottom-left quadrant also represents spatial clusters, but instead includes lower PGS populations that are also surrounded by populations with similarly low PGSs The top-left and bottom-right quadrants are home to the spatial outliers, where values are dissimilar from their neighbors.
Spatial lag regression
## [1] "Regression summary for MIX_Height with k = 1"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.111 -4.019 1.380 3.259 7.473
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 173.612 2.304 75.339 < 2e-16 ***
## get(height_col) 63223.296 14382.306 4.396 4.25e-05 ***
## get(paste0(height_col, "_lag")) 797.852 14234.749 0.056 0.955
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.421 on 64 degrees of freedom
## Multiple R-squared: 0.248, Adjusted R-squared: 0.2245
## F-statistic: 10.55 on 2 and 64 DF, p-value: 0.0001094
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.496187875
## get(paste0(height_col, "_lag"))
## 0.006326596
## [1] "Regression summary for MIX_Height with k = 2"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.005 -4.040 1.417 3.237 7.616
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 174.639 2.564 68.115 < 2e-16 ***
## get(height_col) 60755.206 14393.124 4.221 7.83e-05 ***
## get(paste0(height_col, "_lag")) 11690.565 18215.551 0.642 0.523
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.407 on 64 degrees of freedom
## Multiple R-squared: 0.2528, Adjusted R-squared: 0.2294
## F-statistic: 10.82 on 2 and 64 DF, p-value: 8.925e-05
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.47681786
## get(paste0(height_col, "_lag"))
## 0.07249654
## [1] "Regression summary for MIX_Height with k = 3"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -12.825 -3.980 1.498 3.104 7.766
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 175.297 2.736 64.065 < 2e-16 ***
## get(height_col) 59735.622 14341.805 4.165 9.5e-05 ***
## get(paste0(height_col, "_lag")) 17544.338 19634.273 0.894 0.375
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.394 on 64 degrees of freedom
## Multiple R-squared: 0.2572, Adjusted R-squared: 0.234
## F-statistic: 11.08 on 2 and 64 DF, p-value: 7.37e-05
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.4688160
## get(paste0(height_col, "_lag"))
## 0.1005761
## [1] "Regression summary for MIX_Height with k = 4"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.084 -4.038 1.429 3.214 7.691
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 174.598 2.834 61.614 < 2e-16 ***
## get(height_col) 60943.113 14648.059 4.160 9.65e-05 ***
## get(paste0(height_col, "_lag")) 10738.202 21239.163 0.506 0.615
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.412 on 64 degrees of freedom
## Multiple R-squared: 0.2509, Adjusted R-squared: 0.2275
## F-statistic: 10.72 on 2 and 64 DF, p-value: 9.647e-05
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.47829258
## get(paste0(height_col, "_lag"))
## 0.05812236
## [1] "Regression summary for MIX_Height with k = 5"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.086 -4.093 1.350 3.266 7.653
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 174.33 3.18 54.823 < 2e-16 ***
## get(height_col) 62264.09 14319.98 4.348 5.03e-05 ***
## get(paste0(height_col, "_lag")) 7271.98 23445.40 0.310 0.757
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.418 on 64 degrees of freedom
## Multiple R-squared: 0.2491, Adjusted R-squared: 0.2256
## F-statistic: 10.61 on 2 and 64 DF, p-value: 0.0001044
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.48865986
## get(paste0(height_col, "_lag"))
## 0.03485834
## [1] "Regression summary for MIX_Height with k = 6"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.079 -4.116 1.274 3.240 7.657
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 174.250 3.329 52.346 < 2e-16 ***
## get(height_col) 62552.600 14226.216 4.397 4.23e-05 ***
## get(paste0(height_col, "_lag")) 6331.014 24297.261 0.261 0.795
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.419 on 64 degrees of freedom
## Multiple R-squared: 0.2488, Adjusted R-squared: 0.2253
## F-statistic: 10.6 on 2 and 64 DF, p-value: 0.0001059
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.49092413
## get(paste0(height_col, "_lag"))
## 0.02909205
## [1] "Regression summary for SIB_Height with k = 1"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.3198 -3.4144 0.8481 2.7761 6.5469
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.2790 0.5321 312.481 < 2e-16 ***
## get(height_col) 1091.0378 177.0858 6.161 5.36e-08 ***
## get(paste0(height_col, "_lag")) 73.6351 185.2734 0.397 0.692
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.028 on 64 degrees of freedom
## Multiple R-squared: 0.3757, Adjusted R-squared: 0.3562
## F-statistic: 19.26 on 2 and 64 DF, p-value: 2.83e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.60947513
## get(paste0(height_col, "_lag"))
## 0.03931624
## [1] "Regression summary for SIB_Height with k = 2"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.1564 -3.4919 0.7895 2.6967 6.7170
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.311 0.541 307.430 < 2e-16 ***
## get(height_col) 1089.044 177.077 6.150 5.6e-08 ***
## get(paste0(height_col, "_lag")) 123.278 246.165 0.501 0.618
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.025 on 64 degrees of freedom
## Multiple R-squared: 0.3766, Adjusted R-squared: 0.3572
## F-statistic: 19.33 on 2 and 64 DF, p-value: 2.702e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.60836148
## get(paste0(height_col, "_lag"))
## 0.04953768
## [1] "Regression summary for SIB_Height with k = 3"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.1186 -3.3791 0.4454 2.6749 6.9223
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.5463 0.5806 286.853 < 2e-16 ***
## get(height_col) 1079.6059 175.6516 6.146 5.69e-08 ***
## get(paste0(height_col, "_lag")) 335.6965 287.0436 1.169 0.247
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.991 on 64 degrees of freedom
## Multiple R-squared: 0.3873, Adjusted R-squared: 0.3681
## F-statistic: 20.23 on 2 and 64 DF, p-value: 1.557e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.6030891
## get(paste0(height_col, "_lag"))
## 0.1147538
## [1] "Regression summary for SIB_Height with k = 4"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.2795 -3.4621 0.7858 2.6099 6.6238
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.3648 0.5792 287.234 < 2e-16 ***
## get(height_col) 1080.9476 179.0462 6.037 8.75e-08 ***
## get(paste0(height_col, "_lag")) 144.8538 297.4842 0.487 0.628
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.026 on 64 degrees of freedom
## Multiple R-squared: 0.3765, Adjusted R-squared: 0.357
## F-statistic: 19.32 on 2 and 64 DF, p-value: 2.721e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.60383860
## get(paste0(height_col, "_lag"))
## 0.04870203
## [1] "Regression summary for SIB_Height with k = 5"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.179 -3.376 0.857 2.608 6.599
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.2909 0.5981 278.045 < 2e-16 ***
## get(height_col) 1091.6053 178.3145 6.122 6.27e-08 ***
## get(paste0(height_col, "_lag")) 51.5450 325.9177 0.158 0.875
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.032 on 64 degrees of freedom
## Multiple R-squared: 0.3744, Adjusted R-squared: 0.3549
## F-statistic: 19.15 on 2 and 64 DF, p-value: 3.024e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.60979216
## get(paste0(height_col, "_lag"))
## 0.01575367
## [1] "Regression summary for SIB_Height with k = 6"
##
## Call:
## lm(formula = Height ~ get(height_col) + get(paste0(height_col,
## "_lag")), data = Array2_filtered)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.1626 -3.3658 0.8297 2.5902 6.6305
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 166.2702 0.6271 265.131 < 2e-16 ***
## get(height_col) 1092.9559 179.4326 6.091 7.07e-08 ***
## get(paste0(height_col, "_lag")) 25.2926 355.5331 0.071 0.944
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.033 on 64 degrees of freedom
## Multiple R-squared: 0.3742, Adjusted R-squared: 0.3547
## F-statistic: 19.14 on 2 and 64 DF, p-value: 3.055e-07
##
## [1] "Standardized coefficients:"
## (Intercept) get(height_col)
## NA 0.610546650
## get(paste0(height_col, "_lag"))
## 0.007130693
Regression
##
## Attaching package: 'ncf'
## The following object is masked from 'package:vegan':
##
## mantel.correlog
## The following object is masked from 'package:rstatix':
##
## gather
## The following object is masked from 'package:tidyr':
##
## gather
## [1] "Partial Mantel test for MIX_Height_distance"
## 100 of 999 200 of 999 300 of 999 400 of 999 500 of 999 600 of 999 700 of 999 800 of 999 900 of 999 $MantelR
## r12 r13 r23 r12.3 r13.2
## 0.22724597 0.15219433 0.29118067 0.19346947 0.09233693
##
## $p
## [1] 0.002 0.011 0.002 0.002 0.072
##
## $call
## [1] "partial.mantel.test(M1 = pheno_distance, M2 = pgs_distance, M3 = genetic_distance, "
## [2] " resamp = 999, method = \"pearson\", quiet = FALSE)"
##
## attr(,"class")
## [1] "partial.Mantel"
##
## Call:
## lm(formula = Height_distance ~ get(distance_col) + HUDSON_FST,
## data = merged_df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.3508 -3.1445 -0.6853 2.6219 15.8474
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 4.264 0.173 24.655 < 2e-16 ***
## get(distance_col) 23178.667 2766.380 8.379 < 2e-16 ***
## HUDSON_FST 5.139 1.454 3.535 0.000416 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 4.088 on 2171 degrees of freedom
## (1426 observations deleted due to missingness)
## Multiple R-squared: 0.04671, Adjusted R-squared: 0.04583
## F-statistic: 53.19 on 2 and 2171 DF, p-value: < 2.2e-16
##
## [1] "Standardized coefficients:"
##
## Call:
## lm(formula = Height_distance ~ get(distance_col) + HUDSON_FST,
## data = merged_df)
##
## Standardized Coefficients::
## (Intercept) get(distance_col) HUDSON_FST
## NA 0.18231473 0.07692043
##
## [1] "Partial Mantel test for SIB_Height_distance"
## 100 of 999 200 of 999 300 of 999 400 of 999 500 of 999 600 of 999 700 of 999 800 of 999 900 of 999 $MantelR
## r12 r13 r23 r12.3 r13.2
## 0.35370819 0.15219433 0.39548395 0.32333822 0.01432713
##
## $p
## [1] 0.002 0.014 0.002 0.002 0.373
##
## $call
## [1] "partial.mantel.test(M1 = pheno_distance, M2 = pgs_distance, M3 = genetic_distance, "
## [2] " resamp = 999, method = \"pearson\", quiet = FALSE)"
##
## attr(,"class")
## [1] "partial.Mantel"
##
## Call:
## lm(formula = Height_distance ~ get(distance_col) + HUDSON_FST,
## data = merged_df)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.3466 -3.1431 -0.5182 2.5422 14.0628
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 3.91821 0.15926 24.602 <2e-16 ***
## get(distance_col) 579.54676 37.84278 15.315 <2e-16 ***
## HUDSON_FST -0.02347 1.45940 -0.016 0.987
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.946 on 2171 degrees of freedom
## (1426 observations deleted due to missingness)
## Multiple R-squared: 0.1118, Adjusted R-squared: 0.111
## F-statistic: 136.7 on 2 and 2171 DF, p-value: < 2.2e-16
##
## [1] "Standardized coefficients:"
##
## Call:
## lm(formula = Height_distance ~ get(distance_col) + HUDSON_FST,
## data = merged_df)
##
## Standardized Coefficients::
## (Intercept) get(distance_col) HUDSON_FST
## NA 0.3345509994 -0.0003513522