generate.geno.weight.matrix: Internal simulation function to generate a matrix to weight...

Description Usage Arguments Details Value

View source: R/fnxs_general.R

Description

Internal simulation function to generate a matrix to weight the genotypes when estimating d and stickbreaking coefficients

Usage

1
generate.geno.weight.matrix(geno.matrix, fit.matrix, wts = c(2, 1))

Arguments

geno.matrix

Genotype matrix generated in generate.geno.matrix

fit.matrix

Fitness matrix generated in sim.stick.data

wts

Vector of weights to be applied of form c(singletons, multiples). Default wts=c(2,1).

Details

To calculate the likelihood of the data under the stickbreaking model for a given value of d, we need to estimate the stickbreaking coefficients. The issue is whether all genotypes in the network provide equally good information about the coefficients. The default assumption is that the wild type fitness is know without error while all other genotypes have the same error structure. Coefficient estimates are based on comparing pairs of genotypes: with and without the mutation. Therefore, estimates based on comparing wild type to the single mutations (singletons) are expected to have half the variance of all other comparisons (i.e. multiples). This function generates the weights matrix that reflects this. To change this assumption, change the wts parameter. For example, if the wild type has the same error as all other genotypes, wts = c(1,1) would be appropriate.

Value

weight.matrix


jtvanleuven/Stickbreaker documentation built on May 20, 2019, 3:18 a.m.