]> nmode's Git Repositories - Rnaught/blobdiff - R/WP_unknown.R
Add local imports
[Rnaught] / R / WP_unknown.R
index c5b0a356483b6369d37cd3bcbd77889cc5dd3886..569a880c612b9221f9b1632b82c18be989e2ddd9 100644 (file)
@@ -1,3 +1,6 @@
+source("computeLL.R")
+source("WP_known.R")
+
 #' WP method background function WP_unknown
 #'
 #' This is a background/internal function called by \code{WP}. It computes the maximum likelihood estimator
@@ -36,8 +39,8 @@ WP_unknown <- function(NT, B=100, shape.max=10, scale.max=10, tol=0.999) {
             p <- diff(pgamma(0:range.max, shape=shape[i], scale=scale[j]))
             p <- p / sum(p)
             mle <- WP_known(NT, p)
-            resLL[i,j] <- computeLL(p, NT, mle$R)
-            resR0[i,j] <- mle$R
+            resLL[i,j] <- computeLL(p, NT, mle)
+            resR0[i,j] <- mle
         }
     }