diff --git a/R/fisher_mix.R b/R/fisher_mix.R deleted file mode 100644 index 2f99661425b19eb24d4f87b9ba2f2de74bd18779..0000000000000000000000000000000000000000 --- a/R/fisher_mix.R +++ /dev/null @@ -1,33 +0,0 @@ -##### Simulations of Fisher mixing -############################################################################### -#' Titre -#' -#' Description -#' -#' Long description (several lines) -#' -#' @param nsim number of simulations to perform -#' @param p number of components in the mixture (number of variables) -#' @param nobs total number of observations in the sample -#' -#' @return a vector with simulated random variables fitting the Fisher mixing -#' distribution -#' -#' @seealso \code{\link{treediff}} to perform the test based on these -#' simulations -#' -#' @references To fulfill -#' -#' @examples -#' x <- fisher_mix(1000, 500) -#' \dontrun{hist(x, breaks = 100)} -#' -#' @export -#' -#' @importFrom stats rf - -fisher_mix <- function(nsim, p, nobs) { - all_fishers <- replicate(nsim, sum(rf(p, 1, 1 * (nobs - 2))) / p) - - return(all_fishers) -}