This is a constructor function and where we will document the ckmr class. The ckmr class is an object that includes all the stuff necessary to sample genotypes of pairs of individuals at different loci. Primarily this will be the object returned by create_ckmr. A ckmr object is a named list. At the first level are components orig_data (the original data frame of markers that went into its construction) and loci, a component in which each component corresponds to a locus and has the following components

freqs

A vector of allele frequencies, named by the alleles.

X_l

A list, named by the pairwise relationships investigated, of matrices giving the probabilities of pairwise genotypes between two individauls having that relationship.

C_l

A matrix of probabilities giving the conditional probability of observing each possible genotype, given the true underyling state of the genotype in an individual. This is what encodes the genotyping error model that is assumed for computing the Q ratios (See the paper).

C_l_true

A matrix of probabilities giving the conditional probability of observing each possible genotype, given the true underyling state of the genotype in an individual. This is what encodes the genotyping error model that is actually the true model and which is used for simulating the genotypes when computing the Q ratios (See the paper).

Y_l

The assumed probability of observing pairwise genotypes between two individuals. This is a list of matrices, one for each relationship, as named. The quantities are obtained by matrix multiplication of X_l to C_l.

Y_l_true

The true probability of observing pairwise genotypes between two individuals. This is a list of matrices, one for each relationship, as named. The quantities are obtained by matrix multiplication of X_l to C_l_true.

ckmr_class(L)

Arguments

L

the list that you want to turn into a ckmr object.