search for: tot_k

Displaying 1 result from an estimated 1 matches for "tot_k".

2011 Mar 03
1
Applying function to multiple data
...t;B", "C", "D", "E", "F", "G", "H"), default_frequency = c(0.00229,0.01296,0.01794,0.04303,0.04641,0.06630,0.06862,0.06936)) # ------------------------------- DP = function(k, ODF, ratings) { n <- length(ODF) tot_klnODF <- sum(k*log(ODF)) tot_k <- sum(k) tot_lnODF <- sum(log(ODF)) tot_k2 <- sum(k^2) slope <- exp((n * tot_klnODF - tot_k * tot_lnODF)/(n * tot_k2 - tot_k^2)) intercept <- exp((tot_lnODF - log(slope)* tot_k)/n) IPD...