estimate.d.MLE: Find MLE of d

Description Usage Arguments Details Value Examples

View source: R/d_estimation_fnxs.R

Description

Find MLE of d

Usage

1
2
estimate.d.MLE(geno.matrix, fit.matrix, d.range, accuracy = 0.001,
  wts = c(2, 1))

Arguments

geno.matrix

Genotype matrix generated in generate.geno.matrix

fit.matrix

Fitness matrix generated in sim.stick.data

d.range

Interval of d to search for maximum over

accuracy

tol to send optimize function

wts

Vector of weights to weight genotypes by. Used when generate.geno.weight.matrix is called (see that function). Default is c(2,1), meaning weight single-mutation genotypes twice as heavily as others. Alternatively, vector of weights corresponding to geno.matrix can be provided.

Details

Maximizes the function calc.stick.logLn using optimize

Value

MLE of d

Examples

1
2
3
4
n.muts <- length(Khan.data[1,])-1
geno.matrix <- Khan.data[,seq(1, n.muts)]
fit.matrix <- as.matrix(Khan.data[,(n.muts+1)])
estimate.d.MLE(geno.matrix, fit.matrix,c(0.1, 10),0.001,c(2,1))

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