Description Usage Arguments Value Author(s) See Also Examples
Returns a vector of p-values computed from a combination of lfmm runs. For an example, see
lfmm.
| 1 | lfmm.pvalues (object, genomic.control, lambda, K, d, all, run)
 | 
| object | An lfmmProject object. | 
| genomic.control | A Boolean value. If  | 
| lambda | A numeric value. The lambda value is used as inflation factor to rescale the chi-squared statistics in the computation of p-values. This option requires that  | 
| K | An integer value. The number of latent factors used in the model. | 
| d | An integer value. Computes the p-values for the d-th covariable in the model. | 
| all | A Boolean value. Each variable is considered separately (Obscure parameter). | 
| run | An integer vector representing a list of runs to be combined in the computation of p-values (by default, all runs). | 
| pvalues | A vector of combined p-values for each locus. | 
| GIF | The inflation factor value used for correcting the test statistics. | 
Eric Frichot Olivier Francois
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ### Example of analyses using lfmm ###
data("tutorial")
# creation of a genotype file, "genotypes.lfmm".
# The data contain 400 SNPs for 50 individuals.
write.lfmm(tutorial.R, "genotypes.lfmm")
# creation of an environmental variable file, "gradient.env".
# The data contain one environmental variable measured for 50 individuals.
write.env(tutorial.C, "gradients.env")
################
# lfmm runs    #
################
# main options, K: (the number of latent factors), 
#           CPU: the number of CPUs.
# runs with K = 3 and 2 repetitions.
# around 15 seconds per run.
project = NULL
project = lfmm("genotypes.lfmm", "gradients.env", K = 3, repetitions = 2,
    iterations = 6000, burnin = 3000, project = "new")
# get adjusted p-values using the genomic control method
p = lfmm.pvalues(project, K = 3)
hist(p$pvalues, col = "yellow3")
# get adjusted p-values using lambda = 0.6
p = lfmm.pvalues(project, genomic.control = FALSE, 
    lambda = 0.6, K = 3)
hist(p$pvalues, col = "yellow3")
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.