
R version 3.3.2 (2016-10-31) -- "Sincere Pumpkin Patch"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> 
> set.seed(290875)
> library("party")
Loading required package: grid
Loading required package: mvtnorm
Loading required package: modeltools
Loading required package: stats4
Loading required package: strucchange
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: sandwich
> 
> ### get rid of the NAMESPACE
> attach(list2env(as.list(asNamespace("party"))))
The following objects are masked from package:party:

    cforest, cforest_classical, cforest_control, cforest_unbiased,
    conditionalTree, ctree, ctree_control, edge_simple,
    initVariableFrame, mob, mob_control, node_barplot, node_bivplot,
    node_boxplot, node_density, node_hist, node_inner,
    node_scatterplot, node_surv, node_terminal, nodes, party_intern,
    prettytree, proximity, ptrafo, response, reweight, sctest.mob,
    treeresponse, varimp, varimpAUC, where

> 
> ### 
> ###
> ###    Regression tests for test statistics
> ###    
> ###    functions defined in file `./src/TestStatistic.c'    
> 
> ### tests for function C_maxabsTeststatistic
> xf <- gl(3, 10)
> yf <- gl(3, 10)[sample(1:30)]
> x <- sapply(levels(xf), function(l) as.numeric(xf == l))
> colnames(x) <- NULL
> y <- sapply(levels(yf), function(l) as.numeric(yf == l))
> colnames(y) <- NULL
> weights <- sample(1:30)
> linstat <- LinearStatistic(x, y, weights) 
> expcov <- ExpectCovarLinearStatistic(x, y, weights)
> maxabs <- max(abs(linstat - expcov@expectation) / sqrt(diag(expcov@covariance)))
> stopifnot(isequal(maxabs, 
+     maxabsTestStatistic(linstat, expcov@expectation, expcov@covariance, 1e-10)))
> expcov@covariance[1,1] <- 1e-12
> stopifnot(isequal(maxabs,
+     maxabsTestStatistic(linstat, expcov@expectation, expcov@covariance, 1e-10)))
> 
> ### tests for function C_quadformTeststatistic
> ### -> see LinearStatistic-regtest.R
> 
> 
> proc.time()
   user  system elapsed 
  0.948   0.036   0.981 
