Running 'testcases.R' [155s]
  Running 'testcasesRandom.R' [3s]
  Running 'weightstests.R' [187s]
Running the tests in 'tests/testcases.R' failed.
Complete output:
  > library(ic.infer)
  > 
  > mat <- as.matrix(swiss)
  > colnames(mat) <- NULL
  > covmat <- cov(swiss)
  > linmod <- lm(swiss)
  > linmodwt <- lm(swiss,weights=abs(-23:23))
  > linmodfac <- lm(1/time~poison+treat+poison:treat,boot::poisons)
  > 
  > ## check normal functionality for covariance matrix
  > all.R2(covmat,ui=diag(1,5))
   [1] 0.0000000 0.1246649 0.0000000 0.0000000 0.2150035 0.1735189 0.1246649
   [8] 0.1246649 0.2482782 0.3172607 0.0000000 0.2150035 0.1735189 0.2150035
  [15] 0.1735189 0.3309201 0.1246649 0.2482782 0.3172607 0.2482782 0.3172607
  [22] 0.3858919 0.2150035 0.1735189 0.3309201 0.3309201 0.2482782 0.3172607
  [29] 0.3858919 0.3858919 0.3309201 0.3858919
  > orlm1 <- orlm(covmat,ui=diag(c(-1,1,-1,1,1)),df.error=41)
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  Agriculture Examination Education Catholic Infant.Mortality 
  
  
   Inequality restrictions:
       Agriculture Examination Education Catholic Infant.Mortality            
  1:   -1          0           0         0        0                %*%colnames
  2: A 0           1           0         0        0                %*%colnames
  3:   0           0           -1        0        0                %*%colnames
  4:   0           0           0         1        0                %*%colnames
  5:   0           0           0         0        1                %*%colnames
           
  1:  >=  0
  2:  >=  0
  3:  >=  0
  4:  >=  0
  5:  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.706735 to 0.6993476 
  
  
  Coefficients from order-restricted model: 
       R Agriculture      R Examination        R Education         R Catholic 
          -0.1546175          0.0000000         -0.9802638          0.1246664 
  R Infant.Mortality 
           1.0784422 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > ice <- ic.est(coef(linmod),Sigma=vcov(linmod),ui=(diag(c(-1,1,-1,1,1))),index=2:6)
  > summary(ice)
  Order-restricted estimated mean with restrictions of coefficients of 
  Agriculture Examination Education Catholic Infant.Mortality 
  
  
   Inequality restrictions:
       Agriculture Examination Education Catholic Infant.Mortality            
  1:   -1          0           0         0        0                %*%colnames
  2: A 0           1           0         0        0                %*%colnames
  3:   0           0           -1        0        0                %*%colnames
  4:   0           0           0         1        0                %*%colnames
  5:   0           0           0         0        1                %*%colnames
           
  1:  >=  0
  2:  >=  0
  3:  >=  0
  4:  >=  0
  5:  >=  0
  
   Note: Restrictions marked with A are active. 
  
  Restricted estimate: 
         (Intercept)      R Agriculture      R Examination        R Education 
          62.1013116         -0.1546175          0.0000000         -0.9802638 
          R Catholic R Infant.Mortality 
           0.1246664          1.0784422 
  
   Note: Estimates marked with R are involved in restrictions. 
  > summary(ice,brief=TRUE)
  Order-restricted estimated mean with restrictions of coefficients of 
  Agriculture Examination Education Catholic Infant.Mortality 
  
  
  Restricted estimate: 
         (Intercept)      R Agriculture      R Examination        R Education 
          62.1013116         -0.1546175          0.0000000         -0.9802638 
          R Catholic R Infant.Mortality 
           0.1246664          1.0784422 
  
   Note: Estimates marked with R are involved in restrictions. 
  > orr1<-or.relimp(covmat,df.error=41,ui=diag(c(-1,1,-1,1,1)))
  > 
  > ## check normal functionality for unnamed covariance matrix
  > covmat2 <- cov(mat)
  > all.R2(covmat2,ui=diag(1,5))
   [1] 0.0000000 0.1246649 0.0000000 0.0000000 0.2150035 0.1735189 0.1246649
   [8] 0.1246649 0.2482782 0.3172607 0.0000000 0.2150035 0.1735189 0.2150035
  [15] 0.1735189 0.3309201 0.1246649 0.2482782 0.3172607 0.2482782 0.3172607
  [22] 0.3858919 0.2150035 0.1735189 0.3309201 0.3309201 0.2482782 0.3172607
  [29] 0.3858919 0.3858919 0.3309201 0.3858919
  > orlm1 <- orlm(covmat2,ui=diag(c(-1,1,-1,1,1)),df.error=41)
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  X1 X2 X3 X4 X5 
  
  
   Inequality restrictions:
       X1 X2 X3 X4 X5                   
  1:   -1 0  0  0  0  %*%colnames  >=  0
  2: A 0  1  0  0  0  %*%colnames  >=  0
  3:   0  0  -1 0  0  %*%colnames  >=  0
  4:   0  0  0  1  0  %*%colnames  >=  0
  5:   0  0  0  0  1  %*%colnames  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.706735 to 0.6993476 
  
  
  Coefficients from order-restricted model: 
        R X1       R X2       R X3       R X4       R X5 
  -0.1546175  0.0000000 -0.9802638  0.1246664  1.0784422 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > orr1<-or.relimp(covmat2,df.error=41,ui=diag(c(-1,1,-1,1,1)))
  > 
  > ## check normal functionality for linear model
  > orlm1 <- orlm(linmod,ui=diag(c(-1,1,-1,1,1)))
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  Agriculture Examination Education Catholic Infant.Mortality 
  
  
   Inequality restrictions:
       Agriculture Examination Education Catholic Infant.Mortality            
  1:   -1          0           0         0        0                %*%colnames
  2: A 0           1           0         0        0                %*%colnames
  3:   0           0           -1        0        0                %*%colnames
  4:   0           0           0         1        0                %*%colnames
  5:   0           0           0         0        1                %*%colnames
           
  1:  >=  0
  2:  >=  0
  3:  >=  0
  4:  >=  0
  5:  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.706735 to 0.6993476 
  
  
  Coefficients from order-restricted model: 
         (Intercept)      R Agriculture      R Examination        R Education 
          62.1013116         -0.1546175          0.0000000         -0.9802638 
          R Catholic R Infant.Mortality 
           0.1246664          1.0784422 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > orr1<-or.relimp(linmod,ui=diag(c(-1,1,-1,1,1)))
  > sum(orr1)
  [1] 0.6993476
  > orlm1$R2
  [1] 0.6993476
  > 
  > ## check normal functionality for linear model of unnamed data
  > linmod2 <- lm(as.data.frame(mat))
  > orlm1 <- orlm(linmod2,ui=diag(c(-1,1,-1,1,1)))
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  V2 V3 V4 V5 V6 
  
  
   Inequality restrictions:
       V2 V3 V4 V5 V6                   
  1:   -1 0  0  0  0  %*%colnames  >=  0
  2: A 0  1  0  0  0  %*%colnames  >=  0
  3:   0  0  -1 0  0  %*%colnames  >=  0
  4:   0  0  0  1  0  %*%colnames  >=  0
  5:   0  0  0  0  1  %*%colnames  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.706735 to 0.6993476 
  
  
  Coefficients from order-restricted model: 
    (Intercept)          R V2          R V3          R V4          R V5 
     62.1013116    -0.1546175     0.0000000    -0.9802638     0.1246664 
           R V6 
      1.0784422 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > orr1<-or.relimp(linmod2,df.error=41,ui=diag(c(-1,1,-1,1,1)))
  > sum(orr1)
  [1] 0.6993476
  > orlm1$R2
  [1] 0.6993476
  > 
  > ## check normal functionality for weighted linear model
  > orlm1 <- orlm(linmodwt,ui=diag(c(-1,1,-1,1,1)))
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  Agriculture Examination Education Catholic Infant.Mortality 
  
  
   Inequality restrictions:
       Agriculture Examination Education Catholic Infant.Mortality            
  1:   -1          0           0         0        0                %*%colnames
  2: A 0           1           0         0        0                %*%colnames
  3:   0           0           -1        0        0                %*%colnames
  4:   0           0           0         1        0                %*%colnames
  5:   0           0           0         0        1                %*%colnames
           
  1:  >=  0
  2:  >=  0
  3:  >=  0
  4:  >=  0
  5:  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.7400627 to 0.7340304 
  
  
  Coefficients from order-restricted model: 
         (Intercept)      R Agriculture      R Examination        R Education 
         63.04003588        -0.12758055         0.00000000        -1.04869971 
          R Catholic R Infant.Mortality 
          0.09597652         1.12865481 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > orr1<-or.relimp(linmodwt,df.error=41,ui=diag(c(-1,1,-1,1,1)))
  > sum(orr1)
  [1] 0.7340304
  > orlm1$R2
  [1] 0.7340304
  > 
  > ## check normal functionality for linear model with factors 
  > ## and interactions
  > orlm1 <- orlm(linmodfac,ui=diag(c(1,1,1,-1,-1)),index=2:6)
  > orlm1
  
  Constrained linear model:
  
  
  Restricted model: R2 reduced from 0.8680551 to 0.8145232 
  
  Coefficients:
     (Intercept)         poison2         poison3          treatB          treatC  
          1.8377          1.4308          2.9650          0.0000          0.0000  
          treatD  poison2:treatB  poison3:treatB  poison2:treatC  poison3:treatC  
         -0.1480         -1.8751         -1.7737         -0.5546         -0.5377  
  poison2:treatD  poison3:treatD  
         -1.4189         -1.5629  
  
  > summary(orlm1, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  poison2 poison3 treatB treatC treatD 
  
  
   Inequality restrictions:
       poison2 poison3 treatB treatC treatD                   
  1:   1       0       0      0      0      %*%colnames  >=  0
  2:   0       1       0      0      0      %*%colnames  >=  0
  3: A 0       0       1      0      0      %*%colnames  >=  0
  4: A 0       0       0      -1     0      %*%colnames  >=  0
  5:   0       0       0      0      -1     %*%colnames  >=  0
  
   Note: Restrictions marked with A are active. 
  
  
  Restricted model: R2 reduced from 0.8680551 to 0.8145232 
  
  
  Coefficients from order-restricted model: 
       (Intercept)        R poison2        R poison3         R treatB 
         1.8376895        1.4307805        2.9649958        0.0000000 
          R treatC         R treatD   poison2:treatB   poison3:treatB 
         0.0000000       -0.1480075       -1.8750778       -1.7737125 
    poison2:treatC   poison3:treatC   poison2:treatD   poison3:treatD 
        -0.5545508       -0.5376984       -1.4189284       -1.5628726 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > summary(orlm1,brief=TRUE, overall.tests=FALSE)
  Order-restricted linear model with restrictions of coefficients of 
  poison2 poison3 treatB treatC treatD 
  
  
  Coefficients from order-restricted model: 
       (Intercept)        R poison2        R poison3         R treatB 
         1.8376895        1.4307805        2.9649958        0.0000000 
          R treatC         R treatD   poison2:treatB   poison3:treatB 
         0.0000000       -0.1480075       -1.8750778       -1.7737125 
    poison2:treatC   poison3:treatC   poison2:treatD   poison3:treatD 
        -0.5545508       -0.5376984       -1.4189284       -1.5628726 
  
   Note: Coefficients marked with R are involved in restrictions. 
  > 
  > proc.time()
     user  system elapsed 
     0.93    0.15    1.06 
Running the tests in 'tests/weightstests.R' failed.
Complete output:
  > library(ic.infer)
  > 
  > arcorr <- function(rho,p) {
  +   erg <- diag(rep(1,p))
  +   for (i in 1:(p-1))
  +     for (j in (i+1):p)
  +     erg[i,j] <- erg[j,i] <- rho^(j-i)
  +   erg
  + }
  > 
  > ic.weights(arcorr(0.9,2))
           2          1          0 
  0.42821685 0.50000000 0.07178315 
  > ic.weights(arcorr(0,2))
     2    1    0 
  0.25 0.50 0.25 
  > ic.weights(arcorr(-0.9,2))
           2          1          0 
  0.07178315 0.50000000 0.42821685 
  > ic.weights(arcorr(0.9,3))
            3           2           1           0 
  0.378347383 0.491632291 0.121652617 0.008367709 
  > ic.weights(arcorr(0,3))
      3     2     1     0 
  0.125 0.375 0.375 0.125 
  > ic.weights(arcorr(-0.9,3))
           3          2          1          0 
  0.02190791 0.25835399 0.47809209 0.24164601 
  > ic.weights(arcorr(0.9,4))
             4            3            2            1            0 
  0.3390408960 0.4798642902 0.1600990935 0.0201357098 0.0008600105 
  > ic.weights(arcorr(0,4))
       4      3      2      1      0 
  0.0625 0.2500 0.3750 0.2500 0.0625 
  > ic.weights(arcorr(-0.9,4))
            4           3           2           1           0 
  0.006419644 0.106422742 0.334381333 0.393577258 0.159199023 
  > ic.weights(arcorr(0.9,5))
             5            4            3            2            1            0 
  3.055305e-01 4.660754e-01 1.917994e-01 3.385262e-02 2.670109e-03 7.201888e-05 
  > ic.weights(arcorr(0,5))
        5       4       3       2       1       0 
  0.03125 0.15625 0.31250 0.31250 0.15625 0.03125 
  > ic.weights(arcorr(-0.9,5))
            5           4           3           2           1           0 
  0.001899666 0.040464786 0.187811223 0.359715505 0.310289111 0.099819709 
  > ic.weights(arcorr(0.9,6))
             6            5            4            3            2            1 
  2.770109e-01 4.513602e-01 2.174690e-01 4.833339e-02 5.513591e-03 3.064395e-04 
             0 
  6.445193e-06 
  > ic.weights(arcorr(0,6))
         6        5        4        3        2        1        0 
  0.015625 0.093750 0.234375 0.312500 0.234375 0.093750 0.015625 
  > ic.weights(arcorr(-0.9,6))
             6            5            4            3            2            1 
  0.0005605493 0.0146035892 0.0915346616 0.2502901931 0.3442692895 0.2351062177 
             0 
  0.0636354996 
  > ic.weights(arcorr(0.9,7))
             7            6            5            4            3            2 
  2.519983e-01 4.357313e-01 2.387943e-01 6.352017e-02 9.177096e-03 7.477118e-04 
             1            0 
  3.033923e-05 8.661111e-07 
  > ic.weights(arcorr(0,7))
          7         6         5         4         3         2         1         0 
  0.0078125 0.0546875 0.1640625 0.2734375 0.2734375 0.1640625 0.0546875 0.0078125 
  > ic.weights(arcorr(-0.9,7))
             7            6            5            4            3            2 
  0.0001648441 0.0050883194 0.0407652523 0.1476365945 0.2854499122 0.3068511491 
             1            0 
  0.1736199914 0.0404239370 
  > ic.weights(arcorr(0.9,8))
             8            7            6            5            4            3 
  2.296250e-01 4.197678e-01 2.563786e-01 7.877935e-02 1.390168e-02 1.450183e-03 
             2            1            0 
  9.467149e-05 2.707344e-06 4.567175e-08 
  > ic.weights(arcorr(0,8))
           8          7          6          5          4          3          2 
  0.00390625 0.03125000 0.10937500 0.21875000 0.27343750 0.21875000 0.10937500 
           1          0 
  0.03125000 0.00390625 
  > ic.weights(arcorr(-0.9,8))
             8            7            6            5            4            3 
  4.856295e-05 1.732504e-03 1.703339e-02 7.787615e-02 1.971306e-01 2.946828e-01 
             2            1            0 
  2.600779e-01 1.257086e-01 2.570957e-02 
  > ic.weights(arcorr(0.9,9))
             9            8            7            6            5            4 
  2.096437e-01 4.035273e-01 2.707785e-01 9.390936e-02 1.937625e-02 2.553434e-03 
             3            2            1            0 
  2.012874e-04 9.947183e-06 2.478293e-07 2.589950e-09 
  > ic.weights(arcorr(0,9))
            9           8           7           6           5           4 
  0.001953125 0.017578125 0.070312500 0.164062500 0.246093750 0.246093750 
            3           2           1           0 
  0.164062500 0.070312500 0.017578125 0.001953125 
  > ic.weights(arcorr(-0.9,9))
             9            8            7            6            5            4 
  1.433706e-05 5.784398e-04 6.790933e-03 3.785819e-02 1.199138e-01 2.326591e-01 
             3            2            1            0 
  2.836231e-01 2.125307e-01 8.965780e-02 1.637364e-02 
  > ic.weights(arcorr(0.9,10))
            10            9            8            7            6            5 
  1.917757e-01 3.873294e-01 2.824045e-01 1.088342e-01 2.540916e-02 3.812025e-03 
             4            3            2            1            0 
  4.095812e-04 2.440447e-05 1.034624e-06 2.174200e-08 1.428012e-10 
  > ic.weights(arcorr(0,10))
            10            9            8            7            6            5 
  0.0009765625 0.0097656250 0.0439453125 0.1171875000 0.2050781250 0.2460937500 
             4            3            2            1            0 
  0.2050781250 0.1171875000 0.0439453125 0.0097656250 0.0009765625 
  > ic.weights(arcorr(-0.9,10))
            10            9            8            7            6            5 
  4.208076e-06 1.907635e-04 2.611006e-03 1.729665e-02 6.630925e-02 1.600491e-01 
             4            3            2            1            0 
  2.519200e-01 2.592371e-01 1.687588e-01 6.322637e-02 1.039680e-02 
  > 
  > proc.time()
     user  system elapsed 
    14.04    0.20   14.23