R/draw.noncentral.F.R

Defines functions draw.noncentral.F

Documented in draw.noncentral.F

draw.noncentral.F=function(nrep,dof1,dof2,ncp1,ncp2){
  if (ncp1<0){
    stop("Numerator non-centrality parameter must be non- negative!\n")
  }
  if (ncp2<0){
    stop("Denominator non-centrality parameter must be non- negative!\n")
  }
  if (dof1<=1){
    stop("Numerator degrees of freedom must be greater than 1!\n")
  }
  if (dof2<=1){
    stop("Denominator degrees of freedom must be greater than 1!\n")
  } 
  x=draw.noncentral.chisquared(nrep,dof1,ncp1)$y/draw.noncentral.chisquared(nrep,dof2,ncp2)$y
  return(x)
}

Try the UnivRNG package in your browser

Any scripts or data that you put into this service are public.

UnivRNG documentation built on March 6, 2021, 1:08 a.m.