N. Patterson, A. L. Price, and D. Reich, Population structure and eigenanalysis, vol.517, 2006.

, PLoS Genetics, vol.2, issue.12, p.190

N. Patterson, P. Moorjani, Y. Luo, S. Mallick, N. Rohland et al., , 2012.

, Ancient admixture in human history, Genetics, vol.192, issue.3, pp.1065-1093

B. M. Peter, Admixture, population structure, and F-statistics, Genetics, vol.521, issue.4, pp.1485-1501, 2016.

J. K. Pickrell and J. K. Pritchard, Inference of population splits and mixtures 523 from genome-wide allele frequency data, PLoS Genetics, vol.8, issue.11, p.1002967, 2012.

J. K. Pritchard, M. Stephens, and P. Donnelly, Inference of population structure 525 using multilocus genotype data, Genetics, vol.155, issue.2, pp.945-959, 2000.

M. Slatkin, Statistical methods for analyzing ancient DNA from hominins, 2016.

, Current Opinion in Genetics and Development, vol.41, pp.72-76

M. Slatkin and F. Racimo, Ancient DNA and human history, Proceedings of the 529 National Academy of Sciences, vol.113, pp.6380-6387, 2016.

, temporal_fa = function(sample_ages, Y, k = 2, lambda = 1e-3){ # sample_ages: Ages of samples (year BP/BCE or generations)

#. , Matrix of fully imputed genotypes # k: Number of factors # lambda: Hyper-parameter, p.1

, scale = FALSE)) var_Y <-apply(Y, 1, FUN = var) range_ages <-max(sample_ages) -min(sample_ages) t_n <-1 -(sample_ages -min(sample_ages))/range_ages t_n <-min(var_Y) + (max(var_Y) -min(var_Y)) * t_n #

C. , NA, n, n) for (i in 1:n){ for

. C[i,j]-&lt;-min,

, # Eigenvectors and eigenvalues ec <-eigen(C)

, P_n <-ec$vector lambda_n <-ec$values # New factors D <-diag

, D_inv <-diag

. U_n-&lt;-p_n-%*%-d_inv-%*%-sv$u-%*%-diag,

%. W_n-&lt;-u_n,