Ajout des return() et update du namespace avec roxygen
This commit is contained in:
parent
08a3256313
commit
9a9dc346bd
9 changed files with 19 additions and 12 deletions
17
NAMESPACE
17
NAMESPACE
|
@ -1,9 +1,8 @@
|
|||
export(
|
||||
cftocdf,
|
||||
cftodensity.fft,
|
||||
chisquare.test,
|
||||
emk,
|
||||
empCF,
|
||||
empCGF,
|
||||
empMGF,
|
||||
md.test)
|
||||
export(cftocdf)
|
||||
export(cftodensity.fft)
|
||||
export(chisquare.test)
|
||||
export(emk)
|
||||
export(empCF)
|
||||
export(empCGF)
|
||||
export(empMGF)
|
||||
export(md.test)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#' @param wmax Upper bound for transform variate
|
||||
#' @param MSwindows Is OS Windows ? (use of fork() in *nix)
|
||||
#' @return Distribution function values evaluated on [min,max] range
|
||||
#' @export cftocdf
|
||||
#' @author François Pelletier
|
||||
cftocdf <- function(grid,char.fun,...,wmin=0,wmax=50,MSwindows=FALSE)
|
||||
{
|
||||
|
@ -23,9 +24,9 @@ cftocdf <- function(grid,char.fun,...,wmin=0,wmax=50,MSwindows=FALSE)
|
|||
# Integrate for each grid point using parallel computation if available
|
||||
if(!MSwindows)
|
||||
{
|
||||
unlist(multicore::mclapply(grid,
|
||||
return(unlist(multicore::mclapply(grid,
|
||||
function(x) 1/2-1/pi*
|
||||
integrate(integrand,wmin,wmax,x,char.fun,...)$value))
|
||||
integrate(integrand,wmin,wmax,x,char.fun,...)$value)))
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -35,5 +36,6 @@ cftocdf <- function(grid,char.fun,...,wmin=0,wmax=50,MSwindows=FALSE)
|
|||
{
|
||||
Fx[i] <- 1/2-1/pi*integrate(integrand,wmin,wmax,grid[i],char.fun,...)$value
|
||||
}
|
||||
return(Fx)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#' @return char.fun.t: characteristic function evaluated at t
|
||||
#' @return density.grid: density function grid
|
||||
#' @return density.value: density function evaluated on [min,max] range
|
||||
#' @export cftodensity.fft
|
||||
#' @author François Pelletier
|
||||
cftodensity.fft <- function(char.fun,n,min,max,param)
|
||||
{
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#'
|
||||
#' @return A list containing the chi-square statistic,
|
||||
#' degree of freedom, hypothesis reject boolean and p.value
|
||||
#' @export chisquare.test
|
||||
#' @author François Pelletier
|
||||
chisquare.test <- function(DATA.hist,FUN,...,alpha=0.05,method="integral")
|
||||
{
|
||||
|
|
1
R/emk.R
1
R/emk.R
|
@ -8,6 +8,7 @@
|
|||
#' @param DATA a vector of individual data
|
||||
#' @param order order of the cumulant. Must be between 1 and 4.
|
||||
#' @return A vector of cumulants
|
||||
#' @export emk
|
||||
#' @author François Pelletier
|
||||
emk <- function(DATA,order=1:4)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#' @param t Vector of transform variates
|
||||
#' @param DATA Vector of individual data
|
||||
#' @return A vector of CF values
|
||||
#' @export empCF
|
||||
#' @author François Pelletier
|
||||
empCF <- function(t,DATA)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#' @param t Vector of transform variates
|
||||
#' @param DATA Vector of individual data
|
||||
#' @return A vector of CGF values
|
||||
#' @export empCGF
|
||||
#' @author François Pelletier
|
||||
empCGF <- function(t,DATA)
|
||||
{
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#' @param t Vector of transform variates
|
||||
#' @param DATA Vector of individual data
|
||||
#' @return A vector of MGF values
|
||||
#' @export empMGF
|
||||
#' @author François Pelletier
|
||||
empMGF <- function(t,DATA)
|
||||
{
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#' @param alpha tolerance level
|
||||
#' @return A list containing the chi-square statistic,
|
||||
#' degree of freedom, hypothesis reject boolean and p.value
|
||||
#'
|
||||
#' @export md.test
|
||||
#' @author François Pelletier
|
||||
md.test <- function(param,data,t,FUN,empFUN,alpha=0.05)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue