Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

negative binomial distribution rstudio

dnbinom(x, size, prob, mu, log = FALSE)  #P(X = x)
pnbinom(q, size, prob, mu, lower.tail = TRUE, log.p = FALSE)  #P(X <= x)
qnbinom(p, size, prob, mu, lower.tail = TRUE, log.p = FALSE)  #returns x where P(X <= x)=p
rnbinom(n, size, prob, mu)  #Generate a sample of n elements
Source by stat.ethz.ch #
 
PREVIOUS NEXT
Tagged: #negative #binomial #distribution #rstudio
ADD COMMENT
Topic
Name
1+9 =