Usage
XHWE(ped, loci = NULL, header = T, status_missing = 9, allele_missing = 0,
start.rho = 0.02, simuno = 1000, dv = 1e-07, itertime = 1000, filename = "results.txt")
Arguments
ped
The name of a standard linkage pedigree file or a matrix/dataframe containing pedigree relationship, genotype, and phenotype information, one row for each individual. The first 5 columns give the pedigree id, individual id, father id (0 if founder), mother id (0 if founder), and sex (1=male, 2=female, 0=unknown), in that order. Note that these fields need to be numeric. The 6th column is the affection status (1 = unaffected, 2 = affected). From the 7th column, every consecutive two columns are the alleles at a SNP marker. For males, these two alleles at a SNP marker are the same, because males have only one X chromosome.
loci
The name of a standard linkage loci file. Note that only SNP markers are suitable for the code. For each SNP locus, there are two alleles 1 and 2.
header
The header of input data. If ped contains variable names, then set header = TRUE (or T). The names of SNPs will be used as row names of the output statistics and P values. Otherwise set header = FALSE (or F). The default value is TRUE (or T).
status_missing
The input variable "status_missing" is the missing value for the affection status in the data file, and the default value is 9. It can take NA, but cannot take 1, 2, or any other string values.
allele_missing
The input variable "allele_missing" represents the missing value for the allele. It may be 9 in some data files; or other numeric values; the default value is 0. It cannot be NA, 1, 2, or string values.
start.rho
The initial value of the inbreeding coefficient for iterations, which should be taken to be larger than 0. The default value is 0.02.
simuno
The number of bootstrap replications. The default value is 1000.
dv
The convergence criterion for the absolute difference between the estimates of the log-likelihood function at two consecutive iterations. The default value is 1e-7.
itertime
The maximum number of iterations. The default value is 1000.
filename
The name of the output file together with its physical path. The default filename is "results.txt".