stat.pops: Calculation of Fis empirical and bootstrapped values

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/stat.pops.R

Description

Internal function of Demerelate to use prepared thresholds of relatedness to calculate state of relatedness for empirical data. Additionally, it combines information in different plots and prepares each single output.

Usage

1
2
3
4
5
     stat.pops(Thresholds, tab.pop.pop, pairs, p.correct, 
               directory.name, out.name, file.output, 
               inputdata, object, value, iteration, 
               pm, genotype.ref)
     

Arguments

Thresholds

Thresholds of relatedness to be used for statistics on empirical data.

tab.pop.pop

Dataframe following format of inputformat only column three and four are used for calculations.

pairs

Number of randomized pairings used for reference populations.

p.correct

logical - should Yates correcture be used for χ^2 statistics.

directory.name

Name of the directory results send to.

out.name

Filename of the output.

file.output

logical. Should a cluster dendogram, histograms and .txt files be sent as standard output in your working directory. In some cases (inflating NA values) it may be necessary that this value has to be set as FALSE due to problems in calculating clusters on pairwise NA values.

inputdata

R object or external file to be read internally with standard Demerelate inputformat. Dataframe will be split by population information and calculations will run separately. If no reference population information is specified (ref.pop = "NA") all information on loci are used as reference by omitting population information.

object

Information whether inputdata are an object or should be read in as file.

value

String defining method to calculate allele sharing or similarity estimates.

iteration

Number of bootstrap iterations in F_{is} calculations.

pm

R object or external file to be read internally. Custom reference populations will be loaded for the analysis. The object should be a list of allele frequencies. For each locus a vector with allele frequencies p and allele names as vector names needs to be combined to a list. The last list object is a vector of sample sizes for each locus.

genotype.ref

logical. If set as TRUE random non related populations are generated from genotypes of the reference population. If set as false allele frequencies are used for reference population generation.

Details

Values for logical operators and data are given by Demerelate.

Value

ClusterPopulationNameOutName.pdf

Combined information on dataset by different types of plots.

Relate.meanPopulationNameOutName.txt

Combined information on dataset regarding calculated thresholds and number of different types of relatives in population. Summary of χ^2 statistics.

out.stat[[1]]

Empirical relatedness in populations.

out.stat[[2]]

Summary statistics for χ^2 statistics.

error.individuals.txt

If too many NAs are found in the data the program may stop here and tells you what individuals caused the troubles in calculations.

Author(s)

Philipp Kraemer, <[email protected]>

References

Oliehoek, P. A. et al. (2006) Estimating relatedness between individuals in general populations with a focus on their use in conservation programs. Genetics, 173, 483-496.

See Also

weir F.stat

Examples

1
2
3
     ## internal function not intended for usage without Demerelate
     
     

Demerelate documentation built on May 30, 2017, 8:14 a.m.