0

I have a dataframe like that:

                             word freq1 freq2 freq3 freq4 freq5 freq6 
                          1   a    141   97    103   158   71    101
                          2   b    84    41    51    42    19    22
                          3   c    15    24    33    87    102   59
                          4   d    9     33    41    19    93    75
                          5   e    1     0     4     15    21    16
                          6   f    91    31    42    16    75    9

I want to calculate parameters (r,p) of Negative Binomial Distribution using maximum likelihood estimation in R for each word in my dataframe. I tried to use method mle2 but cant get any results.

For example word_a <- c(141,97,103,158,71,101) How can I use mle method to estimate parameters of distribution for this vector "word_a"?

Roman
  • 1
  • What have you tried. And please provide a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) – Dason Feb 09 '18 at 15:24
  • Please show the code you've tried and explain what "can't get any results" means. – Dason Feb 09 '18 at 15:29
  • I've deleted my code already. I tried to use something like mle2(word_a, "negative binomial") – Roman Feb 09 '18 at 15:57

0 Answers0