Commit 3580533e by Eric Coissac

### rename polynomial to multinomial

parent d9a26bc7
 # Generated by roxygen2: do not edit by hand export(dpolynomialACGT) export(dmultinomialACGT) export(error_jc) export(log_add_exp) export(log_diff_exp) ... ...
 ... ... @@ -55,7 +55,7 @@ log_diff_exp = function(a, b) { #' @export log_sum_exp = function(x) Reduce(logaddexp, x) #' Density probability function of a polynomial distribution for nucleotides #' Density probability function of a multinomial distribution for nucleotides #' #' Computes the probalility to observe a given number of A, C, G, T #' when probalilities of each nucleotide are pA, pC, pG, pT. ... ... @@ -74,15 +74,15 @@ log_sum_exp = function(x) Reduce(logaddexp, x) #' of the observations given the probabilities of observation #' #' @examples #' dpolynomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), #' dmultinomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), #' 0.25,0.25,0.25,0.25) #' dpolynomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), #' dmultinomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), #' pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25, #' log=TRUE) #' #' @author Eric Coissac #' @export dpolynomialACGT = function(A,C,G,T,pA,pC,pG,pT,log=FALSE) { dmultinomialACGT = function(A,C,G,T,pA,pC,pG,pT,log=FALSE) { lpcomb =( log(pA) * A + log(pC) * C ... ...
 % Generated by roxygen2: do not edit by hand % Please edit documentation in R/proba.R \name{dpolynomialACGT} \alias{dpolynomialACGT} \title{Density probability function of a polynomial distribution for nucleotides} \name{dmultinomialACGT} \alias{dmultinomialACGT} \title{Density probability function of a multinomial distribution for nucleotides} \usage{ dpolynomialACGT(A, C, G, T, pA, pC, pG, pT, log = FALSE) dmultinomialACGT(A, C, G, T, pA, pC, pG, pT, log = FALSE) } \arguments{ \item{A}{numeric; number of observed *A* at a given site.} ... ... @@ -34,9 +34,9 @@ Computes the probalility to observe a given number of A, C, G, T when probalilities of each nucleotide are pA, pC, pG, pT. } \examples{ dpolynomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), dmultinomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), 0.25,0.25,0.25,0.25) dpolynomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), dmultinomialACGT(c(3,4),c(3,6),c(3,2),c(3,5), pA = 0.25, pC = 0.25, pG = 0.25, pT = 0.25, log=TRUE) ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!