Browse Source

Modified algorithm for qualitative test selection :

If there is a warning in chisq.test, try fisher.test with workspace=1e+08.
If it still fails, retry fisher.test with simulated p value with 1e+06 samples.
master
Maxime Wack 9 years ago
parent
commit
6036d5f43d
2 changed files with 5 additions and 4 deletions
  1. +4
    -3
      R/desc_groupe.R
  2. +1
    -1
      cosmosR.rproj

+ 4
- 3
R/desc_groupe.R View File

@@ -206,12 +206,13 @@ desc_groupe <- function(table, groupe, param = character(0), html=NULL, titre=NU
test <<- "f"
tryCatch(
{
fisher.test(table[[var]],modulo,workspace)$p.value
fisher.test(table[[var]],modulo,workspace=1e+08)$p.value
},
error=function(e)
{
test <<- "X(f failed)"
chisq.test(table[[var]],modulo)$p.value
#test <<- "X(f failed)"
#chisq.test(table[[var]],modulo)$p.value
fisher.test(table[[var]],modulo,simulate.p.value = T,B = 1e+06)$p.value
})
},
error=function(e)


+ 1
- 1
cosmosR.rproj View File

@@ -13,6 +13,6 @@ RnwWeave: Sweave
LaTeX: pdfLaTeX

BuildType: Package
PackageInstallArgs: --no-multiarch
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace

Loading…
Cancel
Save