find.prior.param: Find the maximum likelihood values for the hyperparameters...

Description Usage Arguments Value Note

View source: R/MADGiC.R

Description

Calculates the value of (a,b) that maximizes the likelihood of q_j (sample-specific background mutation rate) given the relative rate parameters.

Usage

1
  find.prior.param(x, muttable, uniqueA, tableA, S)

Arguments

x

a vector of length two with the initial guess for a and b. Note that these values are on the log scale, i.e. a lower bound of 5E-8 would correspond to a=-16.8.

S

an integer corresponding to the number of samples in the dataset.

muttable

a matrix containing the likelihood due to existing background mutations, see mut.lik.change

uniqueA

a numeric vector containing all unique values of A (see getA)

tableA

a numeric vector of the same length of uniqueA that contains the number of instances of each value in uniqueA

Value

a list containing two items:

a

numeric value for the maximum likelihood estimate of the hyperparameter a representing the prior for q_j (sample-specific mutation rate, q_j~Unif(a,b))

b

numeric value for the maximum likelihood estimate of the hyperparameter a representing the prior for q_j (sample-specific mutation rate, q_j~Unif(a,b))

Note

This internal function is not intended to be called by the user.


kdkorthauer/MADGiC documentation built on June 13, 2020, 1:35 p.m.