Description Usage Arguments Value Examples
This is a wrapper that function that uses a provided distribution to fit the negative log likelihood for a distribution of bottlenecks given a data frame of fits on a per-pair basis. This can be used with mle from the bbmle package.
1  | dist_prob_wrapper(ddist, params)
 | 
ddist | 
 The pdf or pmf function for the distribution to test as a string.  | 
params | 
 The parameters to pass to the ddist function as a string with commas  | 
the negative Log likelihood weighted by the weighted data frame
1 2 3 4 5 6 7 8  | require(magrittr)
require(dplyr)
fit <-trans_fit(small_trans,100,"PA",threshold = NULL,acc=NULL,pair_id)
weights<-small_trans %>% group_by(pair_id) %>%
summarize(donor_mutants = length(which(freq1>0 & freq1<0.5))) %>%
 mutate(weight_factor = max(donor_mutants)/donor_mutants)
binom_fit<-dist_prob_wrapper("dbinom","size,prob")
binom_fit(fit,weights,100,0.1)
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.