Description Usage Arguments Value Examples
This funciton returns 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 |
data |
A tibble or data frame as outputed from trans_fit |
weight |
A tibble or data frame providing the weighting factors for each pair. It should have columns pair Id and weight_factor |
ddist |
The pdf or pmf function for the distribution to test. |
... |
The parameters to pass to the ddist function |
the negative Log likelihood weighted by the weighted data frame
1 2 3 4 5 6 7 | 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)
dist_prob(fit,weights,dzpois,lambda=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.