The function requires the following inputs:
1) A sample-by-variable data frame with phenotypes and covariates.
Column names should include an ID variable, sex variable,
genotypic covariate names, phenotypic covariate names, and phenotype names.
(N.B. a secondary ID variable can be included
in the genotypic covariate names.)
2) A string identifying the ID variable name (e.g., id.var="ID").
3) A vector of genotypic covariates
(e.g., geno.vars=c("ID2","Batch","PC1","PC2",...)).
4) A relatedness data frame containing identity-by-descent (IBD) for
pairs of individuals in the sample-by-variable data frame.
Column names should include two ID variables and an IBD variable.
5) A vector of the 2 ID variable names in the relatedness data frame.
(e.g., rid.vars=c("ID1","ID2")).
6) A string identifying the IBD variable name (e.g., ibd.var="PropIBD").
7) Optional: within.sex = FALSE. Default is within.sex = TRUE
and will permute males and females separately.
8) If within.sex = TRUE (the default), a string identifying the
sex variable name (e.g., sex.var="Inferred_Sex").
9) If within.sex = TRUE (the default), male and female values
in the sex vector (e.g., male.val=1, female.val=2).
10) Optional: a seed for sampling. If a seed is not provided, one will be
chosen randomly during the sampling process (e.g., seed=123).
11) N.B. Any column names not specified in (2)-(9) are assumed to be
phenotypes or phenotypic covariates.