Skip to content
Snippets Groups Projects
Commit bb632fe4 authored by CARDENAS GWENDAELLE's avatar CARDENAS GWENDAELLE
Browse files

Delete fisher_mix.R

parent 3cb8ce53
No related branches found
No related tags found
No related merge requests found
##### 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)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment