Demerelate (version 0.9-2)

F.stat: Head function to calculate F statistics.

Description

Calculation of $F_{is}$ values for a single population and several loci. Calculations are based on statistics from Weir and Cockerham 1984 and Nei 1983.

Usage

F.stat(tab.pop, object = TRUE, iteration = 1000, directory.name = "NA", out.name = "NA")

Arguments

tab.pop
A file with a dataframe containing genetic information with format inputformat.
object
logical - whether data are object or file.
iteration
Number of bootstrap replicates
directory.name
Directory name where files should be exported. Directory must be present when running the function. If set as "NA" results are only printed on screen.
out.name
Name of file for exporting summary of statistics.

Value

Function returns a list for each population containing the following information:Additionally, a file will be generated containing all these information if file.output is set as TRUE or alternatively when directory.name and out.name are given.

Details

This function is executed by Demerelate when Fis set as TRUE. However, $F_{is}$ values can be calculated on single populations without the need of doing a whole new relatedness analysis. This may be useful if $F_{is}$ values were not calculated in the first place. Be sure that the path already is present prior to analysis. However, if set as NA results are printed on screen or exported to an object. Inputdata will be splitted by population names and calculations will be made for each single population. Note that mean $F_{is}$ values calculated by Weir and Cockerham's method are either given as arithmetic mean of single loci $F_{is}$ and as weighted average over loci, which should be unbiased to a first aproximation according to Weir and Cockerham 1984. Since there are many ways to calculate mean $F_{is}$ and all may serve in different situations as a 'good' estimate you should spent some thoughts on this issue.

References

Weir, B.S. and Cockerham, C.C. (1984) Estimating F-Statistics for the analysis of population structure. Evolution, 38, 1358-1370. Nei, M. (1977) F-statistics and analysis of gene diversity in subdivided populations. Annals of Human Genetics, 41, 225-233. Nei, M. and Chesser R.K. (1983) Estimation of fixation indices and gene diversities. Annals of Human Genetics, 47, 253-259.

See Also

Fis.calc

Examples

Run this code

        ## Fis statistics are calculated on demerelpop. Weir and Cockerham
        ## and Nei estimates are provided and either written to an object
        ## or to a file.
        ## For end results iteration of 1000 is recommended.


	      data(demerelpop)
	      fstat.results <- F.stat(demerelpop, iteration = 10, 
                                directory.name = "NA", 
                                out.name = "NA")
        
     

Run the code above in your browser using DataLab