Models target as a mixture of left populations, given a set of outgroup right populations. Can be used to estimate admixture proportions, and to estimate the number of independent admixture events.

qpadm_p(
  f2_data,
  left,
  right,
  target = NULL,
  fudge = 1e-04,
  boot = FALSE,
  constrained = FALSE,
  rnk = length(setdiff(left, target)) - 1,
  cpp = TRUE,
  weights = FALSE,
  f4blocks = NULL
)

Arguments

left

Left populations (sources)

right

Right populations (outgroups)

target

Target population

fudge

Value added to diagonal matrix elements before inverting

boot

If FALSE (the default), block-jackknife resampling will be used to compute standard errors. Otherwise, block-bootstrap resampling will be used to compute standard errors. If boot is an integer, that number will specify the number of bootstrap resamplings. If boot = TRUE, the number of bootstrap resamplings will be equal to the number of SNP blocks.

constrained

Constrain admixture weights to be non-negative

rnk

Rank of f4-matrix. Defaults to one less than full rank.

cpp

Use C++ functions. Setting this to FALSE will be slower but can help with debugging.

weights

Return weights (default = FALSE)

f4blocks

Instead of f2 blocks, f4 blocks can be supplied. This is used by qpadm_multi

Value

Data frame with f4rank, dof, chisq, p, feasible

See also

Examples

left = c('Altai_Neanderthal.DG', 'Vindija.DG')
right = c('Chimp.REF', 'Mbuti.DG', 'Russia_Ust_Ishim.DG', 'Switzerland_Bichon.SG')
target = 'Denisova.DG'
qpadm_p(example_f2_blocks, left, right, target)
#> # A tibble: 1 × 5
#>   f4rank   dof chisq      p feasible
#>    <dbl> <dbl> <dbl>  <dbl> <lgl>   
#> 1      1     2  7.15 0.0280 FALSE