~ubuntu-branches/ubuntu/maverick/openturns/maverick

« back to all changes in this revision

Viewing changes to debian/rotRPackage/R/computeTestKolmogorovBeta.R

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2008-10-03 10:55:20 UTC
  • Revision ID: james.westby@ubuntu.com-20081003105520-i4sqk110f19vp7hd
Tags: 0.12.1-6
* debian/rules: Fix FTBS on hppa, sparc, arm, and armel because of
  __sync_fetch_and_add_4 not being available, the remedy is to use
  -DBOOST_SP_USE_PTHREADS
* debian/rules: add --disable-debug option to configure and set the
  compiler flags to -g -O2 (no -Wall)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
"computeTestKolmogorovBeta" <-
 
2
function(numericalSample, r, t, a, b, testLevel = 0.95, estimatedParameters) {
 
3
 
 
4
  # This function directly uses the ks.test function from the R "stats" package.
 
5
  testKs <- ks.test((numericalSample - a) / (b - a), "pbeta", r, t - r)
 
6
  pValue <- testKs$p.value
 
7
  testResult <- ifelse(pValue > 1 - testLevel, 1, 0)
 
8
  return(list(test = "KolmogorovBeta",
 
9
              testResult = testResult,
 
10
              threshold = 1 - testLevel,
 
11
              pValue = pValue))
 
12
}
 
13