Running ‘test-all.R’ [50s/72s]
Running the tests in ‘tests/test-all.R’ failed.
Complete output:
  > 
  > ## unit tests will not be done if RUnit is not available
  > if(require("RUnit", quietly=TRUE)) {
  +     ## --- Setup ---
  + 
  +     pkg <- "tmlenet" # <-- Tested package name
  + 
  +     if(Sys.getenv("RCMDCHECK") == "FALSE") {
  +         ## Path to unit tests for standalone running under Makefile (not R CMD check)
  +         ## PKG/tests/../inst/unitTests
  +         # path <- file.path(getwd(), "..", "inst", "unitTests")
  +     } else {
  +         ## Path to unit tests for R CMD check
  +         ## PKG.Rcheck/tests/../PKG/unitTests
  +         # path <- system.file(package=pkg, "RUnit")
  +         # REPLACED WITH:
  +         path <- file.path(getwd(), "RUnit")
  +     }
  + 
  +     cat("\nRunning unit tests\n")
  +     print(list(pkg=pkg, getwd=getwd(), pathToUnitTests=path))
  + 
  +     library(package=pkg, character.only=TRUE)
  + 
  +     ## If desired, load the name space to allow testing of private functions
  +     ## if (is.element(pkg, loadedNamespaces()))
  +     ##     attach(loadNamespace(pkg), name=paste("namespace", pkg, sep=":"), pos=3)
  +     ##
  +     ## or simply call PKG:::myPrivateFunction() in tests
  + 
  +     ## --- Testing ---
  + 
  +     ## Define tests
  +     test.suite <- defineTestSuite(name=paste(pkg, "unit testing"),
  +                                         # dirs="./RUnit",
  +                                         dirs=path,
  +                                         testFileRegexp="^RUnit_tests_+",
  +                                         # testFileRegexp="runittests.R",
  +                                         testFuncRegexp = "^test.+",
  +                                         rngKind = "Mersenne-Twister",
  +                                         # rngKind = "Marsaglia-Multicarry",
  +                                         rngNormalKind = "Inversion")
  +                                         # rngNormalKind = "Kinderman-Ramage")
  +     ## Run
  +     tests <- runTestSuite(test.suite)
  + 
  +     ## Default report name
  +     pathReport <- file.path(path, "report")
  + 
  +     ## Report to stdout and text files
  +     cat("------------------- UNIT TEST SUMMARY ---------------------\n\n")
  +     printTextProtocol(tests, showDetails=FALSE)
  +     printTextProtocol(tests, showDetails=FALSE,
  +                         fileName=paste0(pathReport, "Summary.txt"))
  +     printTextProtocol(tests, showDetails=TRUE,
  +                         fileName=paste0(pathReport, ".txt")) 
  +     ## Report to HTML file
  +     printHTMLProtocol(tests, fileName=paste0(pathReport, ".html"))
  +  
  +     ## Return stop() to cause R CMD check stop in case of
  +     ##  - failures i.e. FALSE to unit tests or
  +     ##  - errors i.e. R errors
  +     tmp <- getErrors(tests)
  +     if(tmp$nFail > 0 | tmp$nErr > 0) {
  +         stop(paste("\n\nunit testing failed (#test failures: ", tmp$nFail,
  +                ", #R errors: ",  tmp$nErr, ")\n\n", sep=""))
  +     }
  +     } else {
  +         warning("cannot run unit tests -- package RUnit is not available")
  + }
  
  Running unit tests
  $pkg
  [1] "tmlenet"
  
  $getwd
  [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/tmlenet.Rcheck/tests"
  
  $pathToUnitTests
  [1] "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/tmlenet.Rcheck/tests/RUnit"
  
  tmlenet
  The tmlenet package is still in beta testing. Interpret results with caution.
  
  
  Executing test function test.DefineSummariesClass  ... [1] "Final node expression(s) list: "
  $sA.1
  [1] "A[[Kmax]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A"
  
  $nF
  [1] "nF"
  
  assigning a name 'A' to expression: A
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A[[0:Kmax]]"
  
  $nF
  [1] "nF"
  
  assigning a name 'A' to expression: A[[0:Kmax]]
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "rowSums(A[[0:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "sum(A[[0:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "eval(testexpr_call)"
  
  $nF
  [1] "nF"
  
  Warning: function 'eval' will be called as is, even though it is not on the recognized vectorized functions list; use at your own risk!
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "sum(A[[0:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $W
  [1] "W[[0:Kmax]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W[[0:k]]"
  
  $nF
  [1] "nF"
  
  Error in FUN(X[[i]], ...) : 
    must name complex expressions that involve more than one variable: W[[0:k]]
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $netW
  [1] "W[[0:k]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W[[0:Kmax]]"
  
  $nF
  [1] "nF"
  
  assigning a name 'W' to expression: W[[0:Kmax]]
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "W[[0:Kmax]] + sum(A[[1:Kmax]])"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $netW
  [1] "W[[0:Kmax]]"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA.1
  [1] "rowSums(A[[1:Kmax]])"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $W
  [1] "W[[0:Kmax]] + rowSums(A[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sumAWnets
  [1] "sum(A[[1:Kmax]] * W[[1:Kmax]])"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $A
  [1] "A"
  
  $sumAnets
  [1] "sum(A[[1:Kmax]])"
  
  $sumAWnets
  [1] "sum(A[[1:Kmax]] * W[[1:Kmax]])"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A"
  
  $sumAnets
  [1] "sum(A[[1:Kmax]])"
  
  $sumAWnets
  [1] "sum(A[[1:Kmax]] * W[[1:Kmax]])"
  
  assigning a name 'A' to expression: A
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A[[0:Kmax]]"
  
  $sumAnets
  [1] "sum(A[[1:Kmax]])"
  
  [1] "Final node expression(s) list: "
  $sumAWnets
  [1] "sum(A[[1:Kmax]] * W[[1:Kmax]])"
  
  assigning a name 'A' to expression: A[[0:Kmax]]
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A"
  
  $sumAnets
  [1] "sum(A[[1:Kmax]])"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "sum(A[[1:Kmax]] * W[[1:Kmax]])"
  
  assigning a name 'A' to expression: A
  Error in FUN(X[[i]], ...) : 
    must name complex expressions that involve more than one variable: sum(A[[1:Kmax]] * W[[1:Kmax]])
   done successfully.
  
  
  
  Executing test function test.NetIndClassFromString  ...  done successfully.
  
  
  
  Executing test function test.PoolContRegression  ... Loading required package: data.table
  Loading required package: simcausal
  ...automatically assigning order attribute to some nodes...
  node W1, order:1
  node W2, order:2
  node W3, order:3
  node sA.mu, order:4
  node sA, order:5
  simulating observed dataset from the DAG object
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  Timing stopped at: 0.073 0 0.155
  Timing stopped at: 2.036 0.058 2.937
  Error in `[.data.table`(res_DT, , list(cumprob = cumprod(ProbAeqa_long)),  : 
    SETLENGTH() cannot be applied to an ALTVEC object.
  In addition: Warning messages:
  1: In `[.data.table`(data.table::as.data.table(BinsDat_wide), , `:=`(c("ID"),  :
    with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.
  2: In `[.data.table`(sVar_melt_DT[, `:=`(c("bin_ID"), list(nbin_rep))],  :
    with=FALSE together with := was deprecated in v1.9.4 released Oct 2014. Please wrap the LHS of := with parentheses; e.g., DT[,(myVar):=sum(b),by=a] to assign to column name(s) held in variable myVar. See ?':=' for other examples. As warned in 2014, this is now a warning.
  3: In `[.data.table`(data.table::as.data.table(X_mat), , `:=`(c("ID"),  :
    with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.
  4: In `[.data.table`(data.table::as.data.table(BinsDat_wide), , `:=`(c("ID"),  :
    with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.
  5: In `[.data.table`(sVar_melt_DT[, `:=`(c("bin_ID"), list(nbin_rep))],  :
    with=FALSE together with := was deprecated in v1.9.4 released Oct 2014. Please wrap the LHS of := with parentheses; e.g., DT[,(myVar):=sum(b),by=a] to assign to column name(s) held in variable myVar. See ?':=' for other examples. As warned in 2014, this is now a warning.
  6: In `[.data.table`(data.table::as.data.table(X_mat), , `:=`(c("ID"),  :
    with=FALSE ignored, it isn't needed when using :=. See ?':=' for examples.
   done successfully.
  
  
  
  Executing test function test.RegressionClass  ... Error : length(outvar.class) not equal to length(outvar)
  ...automatically assigning order attribute to some nodes...
  node W1, order:1
  node W2, order:2
  node W3, order:3
  node sA.mu, order:4
  node sA, order:5
  simulating observed dataset from the DAG object
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
   done successfully.
  
  
  
  Executing test function test.bin01bug  ...  done successfully.
  
  
  
  Executing test function test.bugfixes  ...  done successfully.
  
  
  
  Executing test function test.butregquote  ... ...automatically assigning order attribute to some nodes...
  node W1, order:1
  node W2, order:2
  node W3, order:3
  node sA.mu, order:4
  node sA, order:5
  simulating observed dataset from the DAG object
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
   done successfully.
  
  
  
  Executing test function test.detect.int.sA  ... [1] "Binning by mass"
  ...automatically assigning order attribute to some nodes...
  node W1, order:1
  node W2, order:2
  node W3, order:3
  node sA.mu, order:4
  node sA, order:5
  simulating observed dataset from the DAG object
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  [1] "head(obsdat.sW)"
        W1 W2 W3 nF
   [1,]  1  0  1  2
   [2,]  1  1  0  2
   [3,]  1  0  0  1
   [4,]  1  0  1  0
   [5,]  0  0  0  2
   [6,]  0  0  1  1
   [7,]  0  0  0  0
   [8,]  1  1  0  0
   [9,]  1  1  0  3
  [10,]  1  1  1  3
  [1] "Var types: "
  List of 4
   $ W1: chr "binary"
   $ W2: chr "binary"
   $ W3: chr "binary"
   $ nF: chr "categor"
  [1] "Contin covars names: "
  character(0)
  [1] "No normalization bin intervals by mass: "
                           0%           10%           20%           30% 
  -1003.1361255    -3.1361255    -0.7018259    -0.2449314     0.1283161 
            40%           50%           60%           70%           80% 
      0.4451107     0.7746529     1.0842893     1.3890612     1.7377815 
            90%          100%               
      2.2917057     4.1671467  1004.1671467 
  ...automatically assigning order attribute to some nodes...
  node W1, order:1
  node W2, order:2
  node W3, order:3
  node sA.mu, order:4
  node sA, order:5
  simulating observed dataset from the DAG object
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  List of 4
   $ W1: chr "binary"
   $ W2: chr "binary"
   $ W3: chr "binary"
   $ nF: chr "contin"
   done successfully.
  
  
  
  Executing test function test.intervals  ... Error : nrow(NetInd_k) not equal to self$nobs
   done successfully.
  
  
  
  Executing test function test.makebins.fromord  ...  done successfully.
  
  
  
  Executing test function test.nullnodesbug  ...  done successfully.
  
  
  
  Executing test function test.opts.misfun.chkpkgs  ... Error in tmlenet_options(bin.method = "blah") : 
    bin.method argument must be either 'equal.len', 'equal.mass' or 'dhist'
  Error : blahblah package needed for this function to work. Please install it.
   done successfully.
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W1"
  
  [[2]]
  [1] "W2"
  
  [[3]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W1[[0]]"
  
  [[2]]
  [1] "W2"
  
  [[3]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1[[0]]
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W1"
  
  [[2]]
  [1] "W2"
  
  [[3]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W1[[0]]"
  
  [[2]]
  [1] "W2"
  
  [[3]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1[[0]]
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  [1] "Final node expression(s) list: "
  $netW2
  [1] "W2[[0:Kmax]]"
  
  $W3
  [1] "W3[[0]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W2[[0:Kmax]]"
  
  $W3
  [1] "W3[[0]]"
  
  $nF
  [1] "nF"
  
  assigning a name 'W2' to expression: W2[[0:Kmax]]
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW3
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  assigning a name 'W3' to expression: sum(W3[[1:Kmax]])
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW2W3
  [1] "sum(W3[[1:Kmax]] * W2[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "sum(W3[[1:Kmax]] * W2[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  Error in FUN(X[[i]], ...) : 
    must name complex expressions that involve more than one variable: sum(W3[[1:Kmax]] * W2[[1:Kmax]])
  [1] "Final node expression(s) list: "
  $sum.netW2W3
  [1] "W3[[1:Kmax]] * W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W3[[1:Kmax]] * W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  Error in FUN(X[[i]], ...) : 
    must name complex expressions that involve more than one variable: W3[[1:Kmax]] * W2[[1:Kmax]]
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  $netW1
  [1] "W1[[1:Kmax]]"
  
  [[2]]
  [1] "W1"
  
  [[3]]
  [1] "W2"
  
  [[4]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $netW1
  [1] "W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  warning: detected duplicate summary measure names, (netW1), all duplicates starting from first to last will be removed...
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  $netW1
  [1] "W1[[1:Kmax]]"
  
  [[2]]
  [1] "W1"
  
  [[3]]
  [1] "W2"
  
  [[4]]
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $netW2
  [1] "W1[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  assigning a name 'W1' to expression: W1
  assigning a name 'W2' to expression: W2
  assigning a name 'W3' to expression: W3
  warning: detected duplicate column names in summary evaluation matrix, (W1_netF1,W1_netF2,W1_netF3,W1_netF4,W1_netF5,W1_netF6), all duplicates starting from first to last will be removed...
  
  
  Executing test function test.tmleneterrrors  ... [1] "Final node expression(s) list: "
  $netW2
  [1] "W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW3
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netAW2
  [1] "sum((1 - A[[1:Kmax]]) * W2[[1:Kmax]])"
  
  [1] "Final node expression(s) list: "
  $netA
  [1] "A[[0:Kmax]]"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Timing stopped at: 0.001 0 0.001
  Error in fit.hbars(DatNet.ObsP0 = DatNet.ObsP0, est_params_list = est_params_list) : 
    the following predictors from hform.g0 regression could not be located in sW summary measures: netW3_sum
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Timing stopped at: 0.001 0 0.001
  Error in fit.hbars(DatNet.ObsP0 = DatNet.ObsP0, est_params_list = est_params_list) : 
    the following predictors from hform.gstar regression could not be located in sW summary measures: netW3_sum
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Timing stopped at: 0 0 0
  Error in fit.hbars(DatNet.ObsP0 = DatNet.ObsP0, est_params_list = est_params_list) : 
    the following outcomes from hform.g0 regression could not be located in sA summary measures: sum.netW3
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Timing stopped at: 0 0 0
  Error in fit.hbars(DatNet.ObsP0 = DatNet.ObsP0, est_params_list = est_params_list) : 
    the outcome variable names defined by regressions hform.g0 & hform.gstar are not identical; current implementation requires these to be the same.
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Timing stopped at: 0 0 0.001
  Error in fit.hbars(DatNet.ObsP0 = DatNet.ObsP0, est_params_list = est_params_list) : 
    the outcome variable names defined by regressions hform.g0 & hform.gstar are not identical; current implementation requires these to be the same.
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Error in tmlenet(data = df_netKmax6, Qform = " blah ~ netW3_sum + sum_1mAW2_nets",  : 
    the following predictors in Qform regression could not be located among the summary measures: netW3_sum,sum_1mAW2_nets
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Setting the Ynode to: blah
  Error in CheckVarNameExists(data, node_l$Ynode) : 
    variable name blah not found in data input
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Timing stopped at: 0.123 0 0.219
  Error in f.gen.A.star(data = cbind(datnetW$dat.sVar, datnetA$dat.sVar),  : 
    functions f_gstar1 / f_gstar2 must have a named argument 'data'
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Timing stopped at: 0.117 0 0.243
  Error in f.gen.A.star(data = cbind(datnetW$dat.sVar, datnetA$dat.sVar),  : 
    f_gstar1/f_gstar2 must be either a function or a vector of length nrow(data) or 1
   done successfully.
  
  
  
  Executing test function test.examples  ... Loading required package: stringr
  [1] "---------------------------"
  [1] "f.g_args: NULL"
    IDs W1 W2 W3 A Y nFriends                  Net_str
  1  I1  3  0  1 1 1        1                     I537
  2  I2  3  1  0 0 1        5    I6 I58 I595 I641 I654
  3  I3  5  0  0 0 0        5 I163 I637 I650 I722 I783
  4  I4  2  1  0 1 1        2                 I49 I995
  5  I5  3  1  1 0 1        3           I358 I369 I762
  6  I6  2  0  1 1 1        2                I682 I917
  [1] "integer"
  [1] "numeric"
  
    0   1   2   3   4   5 
   50 170 302 242 180  56 
  [1] 2.500 0.553 0.589
  [1] 0.198
  [1] 0.435
  [1] 3.307
  [1] "Final node expression(s) list: "
  $netW2
  [1] "W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW3
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netAW2
  [1] "sum((1 - A[[1:Kmax]]) * W2[[1:Kmax]])"
  
  [1] "Final node expression(s) list: "
  $netA
  [1] "A[[0:Kmax]]"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Setting the Ynode to: Y
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.covariate"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
       [,1] [,2] [,3] [,4] [,5] [,6]
  [1,]  537   NA   NA   NA   NA   NA
  [2,]    6   58  595  641  654   NA
  [3,]  163  637  650  722  783   NA
  [4,]   49  995   NA   NA   NA   NA
  [5,]  358  369  762   NA   NA   NA
  [6,]  682  917   NA   NA   NA   NA
  [1] 1 5 5 2 3 2
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ runTMLE : chr "tmle.intercept"
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Setting the Ynode to: Y
  [1] "Final node expression(s) list: "
  $netW2
  [1] "W2[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW3
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $netW1
  [1] "W1[[0:Kmax]]"
  
  $netW3
  [1] "W3[[1:Kmax]]"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netAW2
  [1] "sum((1 - A[[1:Kmax]]) * W2[[1:Kmax]])"
  
  [1] "Final node expression(s) list: "
  $netA
  [1] "A[[0:Kmax]]"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ f_g0    :function (data, ...)  
   $ n_MCsims: num 10
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "head(DatNet.g0$dat.sWsA): "
       W2_netF1 W2_netF2 W2_netF3 W2_netF4 W2_netF5 W2_netF6 sum.netW3 W1
  [1,]        1        0        0        0        0        0         0  3
  [2,]        0        1        1        1        1        0         3  3
  [3,]        0        0        1        1        1        0         3  5
  [4,]        1        0        0        0        0        0         0  2
  [5,]        1        1        1        0        0        0         1  3
  [6,]        1        1        0        0        0        0         0  2
       W1_netF1 W1_netF2 W1_netF3 W1_netF4 W1_netF5 W1_netF6 W3_netF1 W3_netF2
  [1,]        2        0        0        0        0        0        0        0
  [2,]        2        4        3        4        3        0        1        0
  [3,]        5        3        3        3        4        0        0        1
  [4,]        2        4        0        0        0        0        0        0
  [5,]        4        3        4        0        0        0        0        0
  [6,]        3        3        0        0        0        0        0        0
       W3_netF3 W3_netF4 W3_netF5 W3_netF6 nF sum.netAW2 A A_netF1 A_netF2
  [1,]        0        0        0        0  1          0 1       1      NA
  [2,]        1        0        1        0  5          3 0       0       0
  [3,]        1        1        0        0  5          3 0       0       1
  [4,]        0        0        0        0  2          1 1       0       0
  [5,]        1        0        0        0  3          3 0       0       0
  [6,]        0        0        0        0  2          2 0       0       0
       A_netF3 A_netF4 A_netF5 A_netF6
  [1,]      NA      NA      NA      NA
  [2,]       1       0       0      NA
  [3,]       0       0       0      NA
  [4,]      NA      NA      NA      NA
  [5,]       0      NA      NA      NA
  [6,]      NA      NA      NA      NA
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netW3
  [1] "sum(W3[[1:Kmax]])"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sum.netAW2
  [1] "sum((1 - A[[1:Kmax]]) * W2[[1:Kmax]])"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "W1[[0:Kmax]]"
  
  $nF
  [1] "nF"
  
  Some summary measures were not named, automatic column name(s) will be generated during evaluation
  [1] "Final node expression(s) list: "
  [[1]]
  [1] "A[[0:Kmax]]"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 100
  assigning a name 'W1' to expression: W1[[0:Kmax]]
  assigning a name 'A' to expression: A[[0:Kmax]]
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 2
   $ f_gstar2: num 0
   $ n_MCsims: num 1
   done successfully.
  
  
  
  Executing test function test.net.fit.density.iptw  ... [1] "shift: 1"
  [1] "trunc.const: 10"
  done generating network
  done generating network
  [1] "mean(datO$Y): 0.2093"
  [1] "psi0: 0.1138"
     user  system elapsed 
    1.236   0.000   1.315 
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  $net.mean.sA
  [1] "ifelse(nF > 0, rowSums(sA[[1:Kmax]])/nF, 0)"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $net.mean.W1
  [1] "ifelse(nF > 0, rowSums(W1[[1:Kmax]])/nF, 0)"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "trunc.sA.gstar"
  
  $net.mean.sA
  [1] "ifelse(nF > 0, rowSums(trunc.sA.gstar[[1:Kmax]])/nF, 0)"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $net.mean.W1
  [1] "ifelse(nF > 0, rowSums(W1[[1:Kmax]])/nF, 0)"
  
  $nF
  [1] "nF"
  
  [1] "testm.sW"
       W1 W2 W3 net.mean.W1 nF
  [1,]  0  1  0         0.6  5
  [2,]  1  0  0         0.6  5
  [3,]  1  0  1         0.2  5
  [4,]  1  0  0         0.4  5
  [5,]  0  0  0         0.6  5
  [6,]  1  1  1         0.2  5
  [1] "testm.sW map"
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $net.mean.W1
  [1] "net.mean.W1"
  
  $nF
  [1] "nF"
  
    ID nF W1 W2 W3 sA.mu         sA untrunc.sA.gstar  r.new.sA trunc.sA.gstar
  1  1  5  0  1  0  0.58  0.2894165        1.2894165 1.2329584      1.2894165
  2  2  5  1  0  0  0.98  2.5303237        3.5303237 7.7704159      3.5303237
  3  3  5  1  0  1  1.31  2.4308092        3.4308092 5.0571807      3.4308092
  4  4  5  1  0  0  0.98  1.9895124        2.9895124 4.5245241      2.9895124
  5  5  5  0  0  0  0.00 -0.5280197        0.4719803 0.9723692      0.4719803
  6  6  5  1  1  1  1.89  0.3112127        1.3112127 0.3400076      1.3112127
        probY Y probY.gstar Y.gstar
  1 0.3107755 0  0.16158305       0
  2 0.1064594 0  0.04845609       0
  3 0.1531294 0  0.07173993       0
  4 0.2215831 0  0.10847006       0
  5 0.5170472 0  0.31393536       0
  6 0.1413373 0  0.06572895       0
  [1] "testm.sA"
               sA net.mean.sA
  [1,]  0.2894165  -0.3695989
  [2,]  2.5303237   0.8836291
  [3,]  2.4308092  -0.1410374
  [4,]  1.9895124  -0.2797291
  [5,] -0.5280197  -0.3668167
  [6,]  0.3112127   0.3706055
  [1] "testm.sA map"
  $sA
  [1] "sA"
  
  $net.mean.sA
  [1] "net.mean.sA"
  
    ID nF W1 W2 W3 sA.mu         sA untrunc.sA.gstar  r.new.sA trunc.sA.gstar
  1  1  5  0  1  0  0.58  0.2894165        1.2894165 1.2329584      1.2894165
  2  2  5  1  0  0  0.98  2.5303237        3.5303237 7.7704159      3.5303237
  3  3  5  1  0  1  1.31  2.4308092        3.4308092 5.0571807      3.4308092
  4  4  5  1  0  0  0.98  1.9895124        2.9895124 4.5245241      2.9895124
  5  5  5  0  0  0  0.00 -0.5280197        0.4719803 0.9723692      0.4719803
  6  6  5  1  1  1  1.89  0.3112127        1.3112127 0.3400076      1.3112127
        probY Y probY.gstar Y.gstar
  1 0.3107755 0  0.16158305       0
  2 0.1064594 0  0.04845609       0
  3 0.1531294 0  0.07173993       0
  4 0.2215831 0  0.10847006       0
  5 0.5170472 0  0.31393536       0
  6 0.1413373 0  0.06572895       0
  [1] "true psi0: 0.1138"
  [1] "iptw (untrimmed): 0.113711"
  [1] "iptw (wts trimmed by 130): 0.113711"
   done successfully.
  
  
  
  Executing test function test.onesim.iid.tmlefit  ... [1] "mean(datO$Y): 0.3156"
  [1] "psi0: 0.2419"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 10
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  No network (friends) specified by NETIDnode or NETIDmat args, assuming the input data is i.i.d.
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "mean(datO$Y): 0.3201"
  [1] "psi0: 0.2377"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 10
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  No network (friends) specified by NETIDnode or NETIDmat args, assuming the input data is i.i.d.
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.len"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 1000
  
  [1] "mean(datO$Y): 0.3201"
  [1] "psi0: 0.2377"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 10
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  No network (friends) specified by NETIDnode or NETIDmat args, assuming the input data is i.i.d.
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
  [1] "shift.const: 1"
   done successfully.
  
  
  
  Executing test function test.simple.fit.density.sA  ... [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  [1] "fitting h_gN based equal.len intervals (default) and speedglm (default): "
      Intercept            W1            W2            W3 
  -2.656607e+01 -1.101119e-13  2.683022e-12  7.389518e-13 
  $reg
  [1] "P(sA_B.2|W1,W2,W3)"
  
  $coef
    Intercept          W1          W2          W3 
   -5.3699268 -17.8142663  -1.1377939  -0.5512446 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "speedglm"
  
  [1] "h_gN fit under speedglm: 0.271882349797543"
  [1] "fitting h_gN based equal.len intervals (default) and glm.fit: "
      Intercept            W1            W2            W3 
  -3.156607e+01  1.101532e-13 -7.430658e-14 -8.930839e-14 
  $reg
  [1] "P(sA_B.2|W1,W2,W3)"
  
  $coef
    Intercept          W1          W2          W3 
   -5.3699268 -17.8142663  -1.1377939  -0.5512446 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "glm"
  
  [1] "h_gN fit under glm: 0.27188234979833"
  [1] "fitting h_gN based on bin_bymass = TRUE and speedglm (default): "
  [1] "fitting h_gN based on dhist intervals and speedglm (default): "
  [1] "Intervals for dhist: "
   [1] -1003.5240566    -3.5240566    -1.9562682    -0.8766233    -0.2052710
   [6]     0.2963970     0.7404754     1.2078705     1.6959939     2.3455552
  [11]     3.3931981     4.9362651  1004.9362651
      Intercept            W1            W2            W3 
  -2.656607e+01 -1.101119e-13  2.683022e-12  7.389518e-13 
  $reg
  [1] "P(sA_B.2|W1,W2,W3)"
  
  $coef
   Intercept         W1         W2         W3 
  -3.6814355 -3.3377470 -1.2038849 -0.7968579 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "speedglm"
  
  $reg
  [1] "P(sA_B.3|W1,W2,W3)"
  
  $coef
   Intercept         W1         W2         W3 
  -1.5177102 -2.0829858 -1.1096309 -0.7614043 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "speedglm"
  
  $reg
  [1] "P(sA_B.4|W1,W2,W3)"
  
  $coef
   Intercept         W1         W2         W3 
  -0.8812358 -1.5100728 -0.9225017 -0.5817254 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "speedglm"
  
  $reg
  [1] "P(sA_B.5|W1,W2,W3)"
  
  $coef
   Intercept         W1         W2         W3 
  -0.5619049 -1.2578611 -0.6878259 -0.4793537 
  
  $linkfun
  [1] "logit_linkinv"
  
  $fitfunname
  [1] "speedglm"
  
  [1] "regclass.bidhist mean(h_gN) under speedglm: 0.27687500785635"
   done successfully.
  
  
  
  Executing test function test.onesim.net.tmlefit  ... [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,]    2    4    5    7   10
  [2,]    3    4    7    8    9
  [3,]    1    2    6    8    9
  [4,]    1    5    6    9   10
  [5,]    1    3    4    7    9
  [6,]    2    3    5    7    9
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  $net.mean.sA
  [1] "rowMeans(sA[[1:Kmax]])"
  
  [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,] 3633 4387 5236 6186 7689
  [2,] 1342 5020 5806 6274 8768
  [3,]  302  831 1128 7044 8886
  [4,] 2522 3423 7329 8433 9078
  [5,] 1368 2172 2421 4427 8159
  [6,]  161 1355 7271 9599 9759
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.len"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 1000
  
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.mass"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 1000
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.mass"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "CIs: "
         LBCI_0.025 UBCI_0.975
  tmle    0.1930713  0.2387909
  h_iptw  0.1886270  0.2476407
  gcomp          NA         NA
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.len"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] 10
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 1000
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : num 10
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "CIs: "
         LBCI_0.025 UBCI_0.975
  tmle    0.2001600  0.2513419
  h_iptw  0.1961125  0.2638809
  gcomp          NA         NA
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.mass"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 1000
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "CIs: "
         LBCI_0.025 UBCI_0.975
  tmle    0.1925783  0.2375190
  h_iptw  0.1886270  0.2476407
  gcomp          NA         NA
   done successfully.
  
  
  
  Executing test function test.catnet.fit.density.iptw  ... [1] "shift: 1"
  done generating network
  done generating network
  [1] "mean(datO$Y): 0.3446"
  [1] "psi0: 0.2819"
     user  system elapsed 
    1.283   0.000   2.085 
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  $net.sA
  [1] "ifelse(nF > 0, rowSums(sA[[1:Kmax]])/nF, 0)"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $net.W2
  [1] "ifelse(nF > 0, rowSums(W2[[1:Kmax]])/nF, 0)"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA.gstar"
  
  $net.sA
  [1] "ifelse(nF > 0, rowSums(sA.gstar[[1:Kmax]])/nF, 0)"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $net.W2
  [1] "ifelse(nF > 0, rowSums(W2[[1:Kmax]])/nF, 0)"
  
  $nF
  [1] "nF"
  
    ID nF W1 W2 net.W2 W3 sA net.sA sA.gstar net.sA.gstar     probY Y probY.gstar
  1  1  5  2  0    0.8  1  3    2.6        4          3.6 0.4452208 1  0.37285223
  2  2  5  4  1    0.6  0  7    5.4        7          6.2 0.3407396 1  0.30576366
  3  3  5  3  1    0.8  0  7    4.2        7          4.8 0.2650274 1  0.24232036
  4  4  5  3  1    0.6  1  6    4.8        7          5.6 0.2809003 0  0.23147522
  5  5  5  1  1    0.6  1  6    5.0        7          5.8 0.1213188 0  0.09621554
  6  6  5  3  0    0.6  0  3    5.4        4          6.0 0.4551211 1  0.40131234
    Y.gstar
  1       0
  2       1
  3       0
  4       0
  5       0
  6       0
  [1] "testm.sW"
       W1 W2 net.W2 nF
  [1,]  2  0    0.8  5
  [2,]  4  1    0.6  5
  [3,]  3  1    0.8  5
  [4,]  3  1    0.6  5
  [5,]  1  1    0.6  5
  [6,]  3  0    0.6  5
  [1] "testm.sW map"
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $net.W2
  [1] "net.W2"
  
  $nF
  [1] "nF"
  
  [1] "testm.sA"
       sA net.sA
  [1,]  3    2.6
  [2,]  7    5.4
  [3,]  7    4.2
  [4,]  6    4.8
  [5,]  6    5.0
  [6,]  3    5.4
  [1] "testm.sA map"
  $sA
  [1] "sA"
  
  $net.sA
  [1] "net.sA"
  
  [1] "testm.sW.gstar"
       sA net.sA
  [1,]  4    3.6
  [2,]  7    6.2
  [3,]  7    4.8
  [4,]  7    5.6
  [5,]  7    5.8
  [6,]  4    6.0
  [1] "testm.sA.gstar map"
  $sA
  [1] "sA"
  
  $net.sA
  [1] "net.sA"
  
  No. of categories for net.sA was collapsed from 22 to 16 due to too few obs.
  [1] "old intervals: "
               0%      5%     10%     15%     20%     25%     30%     35%     40% 
  -998.01    1.99    3.00    3.20    3.40    3.60    3.80    3.80    4.00    4.00 
      45%     50%     55%     60%     65%     70%     75%     80%     85%     90% 
     4.20    4.20    4.40    4.40    4.60    4.60    4.80    5.00    5.00    5.20 
      95%    100%         
     5.60    6.81 1006.81 
  [1] "new intervals: "
   [1] -998.01    1.99    3.00    3.20    3.40    3.60    3.80    4.00    4.20
  [10]    4.40    4.60    4.80    5.00    5.20    5.60    6.81 1006.81
  [1] "mean(h_gN): 0.07417"
  No. of categories for net.sA was collapsed from 22 to 16 due to too few obs.
  [1] "old intervals: "
               0%      5%     10%     15%     20%     25%     30%     35%     40% 
  -998.01    1.99    3.00    3.20    3.40    3.60    3.80    3.80    4.00    4.00 
      45%     50%     55%     60%     65%     70%     75%     80%     85%     90% 
     4.20    4.20    4.40    4.40    4.60    4.60    4.80    5.00    5.00    5.20 
      95%    100%         
     5.60    6.81 1006.81 
  [1] "new intervals: "
   [1] -998.01    1.99    3.00    3.20    3.40    3.60    3.80    4.00    4.20
  [10]    4.40    4.60    4.80    5.00    5.20    5.60    6.81 1006.81
  [1] "mean(h_gstar_obs.sA): 0.0524"
  [1] 0.287992
  [1] 0.0001123328
  [1] 0.4795622
  [1] 8.330761e-24
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.0000  0.1112  0.4062  1.0080  1.1099 26.9188 
     Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
   0.0000  0.1112  0.4062  1.0080  1.1099 26.9188 
  [1] "true psi0: 0.2819"
  [1] "iptw (untrimmed): 0.292515"
  [1] "iptw (wts trimmed by 130): 0.292515"
   done successfully.
  
  
  
  Executing test function test.shallowdeep.copy  ... [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,]    3    5    6    7    8
  [2,]    1    3    4    9   10
  [3,]    2    4    5    8    9
  [4,]    1    5    6    8   10
  [5,]    2    3    4    7   10
  [6,]    1    5    7    8    9
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  $net.mean.sA
  [1] "rowMeans(sA[[1:Kmax]])"
  
  [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,]   51   53   59   90   91
  [2,]   17   26   31   55   93
  [3,]   16   54   61   66   99
  [4,]    8   29   64   71   98
  [5,]   12   13   20   60   77
  [6,]    8   25   65   68   95
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.mass"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 100
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.mass"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 100
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
   done successfully.
  
  
  
  Executing test function test.usefitted.h  ... [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,]    3    4    8    9   10
  [2,]    1    4    6    8    9
  [3,]    1    2    5    7   10
  [4,]    1    5    6    7    8
  [5,]    3    4    6    9   10
  [6,]    2    3    5    7    8
  [1] "Final node expression(s) list: "
  $W1
  [1] "W1"
  
  $W2
  [1] "W2"
  
  $W3
  [1] "W3"
  
  $nF
  [1] "nF"
  
  [1] "Detected replaceNAw0 flag with value: TRUE"
  [1] "Final node expression(s) list: "
  $sA
  [1] "sA"
  
  $net.mean.sA
  [1] "rowMeans(sA[[1:Kmax]])"
  
  [1] "old Kmax:5"
  [1] "new Kmax:5"
  [1] "NetInd_k"
       [,1] [,2] [,3] [,4] [,5]
  [1,]   51   53   59   90   91
  [2,]   17   26   31   55   93
  [3,]   16   54   61   66   99
  [4,]    8   29   64   71   98
  [5,]   12   13   20   60   77
  [6,]    8   25   65   68   95
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.mass"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 100
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.mass"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 100
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "res$EY_gstar1$estimates: "
          estimate
  tmle   0.2230316
  h_iptw 0.2464948
  gcomp  0.2264758
  $useglm
  [1] FALSE
  
  $bin.method
  [1] "equal.len"
  
  $parfit
  [1] FALSE
  
  $nbins
  [1] NA
  
  $maxncats
  [1] 20
  
  $poolContinVar
  [1] FALSE
  
  $maxNperBin
  [1] 100
  
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 100
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 1
   $ n_MCsims: num 1
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  [1] "res2a$EY_gstar1$estimates: "
          estimate
  tmle   0.2264758
  h_iptw 0.2800000
  gcomp  0.2264758
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 100
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 3
   $ n_MCsims              : num 1
   $ h_g0_SummariesModel   :Classes 'SummariesModel', 'R6' <SummariesModel>
    Public:
      clone: function (deep = FALSE) 
      fit: function (data) 
      getPsAsW.models: function () 
      getcumprodAeqa: function () 
      initialize: function (reg, ...) 
      length: function () 
      n_regs: 2
      parfit_allowed: FALSE
      predict: function (newdata) 
      predictAeqa: function (newdata, ...) 
      wipe.alldat: active binding
    Private:
      PsAsW.models: list
      cumprodAeqa: 0.0739650324811682 0.0739650324811682 0.0739650324811682 ...
      deep_clone: function (name, value) 
      fitted.pbins: list 
   $ h_gstar_SummariesModel:Classes 'SummariesModel', 'R6' <SummariesModel>
    Public:
      clone: function (deep = FALSE) 
      fit: function (data) 
      getPsAsW.models: function () 
      getcumprodAeqa: function () 
      initialize: function (reg, ...) 
      length: function () 
      n_regs: 2
      parfit_allowed: FALSE
      predict: function (newdata) 
      predictAeqa: function (newdata, ...) 
      wipe.alldat: active binding
    Private:
      PsAsW.models: list
      cumprodAeqa: 0.0680385496290182 0.0693540831066013 0.067054850911147  ...
      deep_clone: function (name, value) 
      fitted.pbins: list 
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  NOTE: Predictions for P(sA|sW) under g0 will be based on the model fit in h_g0_SummariesModel,all modeling settings will be ignored
  NOTE: Predictions for P(sA^*|sW^*) under f_gstar will be based on the model fit in h_g0_SummariesModel, all modeling settings will be ignored
  Error in model.frame.default(formula = Y ~ offset(off), data = data.frame(Y = Y,  : 
    variable lengths differ (found for '(weights)')
  In addition: Warning messages:
  1: glm.fit: fitted probabilities numerically 0 or 1 occurred 
  2: In (function (n, probs)  :
    This function is deprecated, please use rcat.b1() instead.
  3: In (function (n, probs)  :
    This function is deprecated, please use rcat.b1() instead.
  Running tmlenet with the following settings from tmlenet_options(): 
  List of 7
   $ useglm       : logi FALSE
   $ bin.method   : chr "equal.len"
   $ parfit       : logi FALSE
   $ nbins        : logi NA
   $ maxncats     : num 20
   $ poolContinVar: logi FALSE
   $ maxNperBin   : num 100
  Running tmlenet with the following settings from optPars arg of tmlenet(): 
  List of 3
   $ n_MCsims              : num 1
   $ h_g0_SummariesModel   :Classes 'SummariesModel', 'R6' <SummariesModel>
    Public:
      clone: function (deep = FALSE) 
      fit: function (data) 
      getPsAsW.models: function () 
      getcumprodAeqa: function () 
      initialize: function (reg, ...) 
      length: function () 
      n_regs: 2
      parfit_allowed: FALSE
      predict: function (newdata) 
      predictAeqa: function (newdata, ...) 
      wipe.alldat: active binding
    Private:
      PsAsW.models: list
      cumprodAeqa: 0.0739650324811682 0.0739650324811682 0.0739650324811682 ...
      deep_clone: function (name, value) 
      fitted.pbins: list 
   $ h_gstar_SummariesModel:Classes 'SummariesModel', 'R6' <SummariesModel>
    Public:
      clone: function (deep = FALSE) 
      fit: function (data) 
      getPsAsW.models: function () 
      getcumprodAeqa: function () 
      initialize: function (reg, ...) 
      length: function () 
      n_regs: 2
      parfit_allowed: FALSE
      predict: function (newdata) 
      predictAeqa: function (newdata, ...) 
      wipe.alldat: active binding
    Private:
      PsAsW.models: list
      cumprodAeqa: 0.0680385496290182 0.0693540831066013 0.067054850911147  ...
      deep_clone: function (name, value) 
      fitted.pbins: list 
  Since both Ynode and Qform are specified, the left-hand side of Qform will be ignored, with outcome being set to Ynode: Y
  NOTE: Predictions for P(sA|sW) under g0 will be based on the model fit in h_g0_SummariesModel,all modeling settings will be ignored
  NOTE: Predictions for P(sA^*|sW^*) under f_gstar will be based on the model fit in h_g0_SummariesModel, all modeling settings will be ignored
  [1] "res2b$EY_gstar1$estimates: "
          estimate
  tmle   0.2230316
  h_iptw 0.2464948
  gcomp  0.2264758
   done successfully.
  
  ------------------- UNIT TEST SUMMARY ---------------------
  
  RUNIT TEST PROTOCOL -- Sat May  5 21:14:44 2018 
  *********************************************** 
  Number of test functions: 21 
  Number of errors: 1 
  Number of failures: 0 
  
   
  1 Test Suite : 
  tmlenet unit testing - 21 test functions, 1 error, 0 failures
  ERROR in test.PoolContRegression: Error in `[.data.table`(res_DT, , list(cumprob = cumprod(ProbAeqa_long)),  : 
    SETLENGTH() cannot be applied to an ALTVEC object.
  Error: 
  
  unit testing failed (#test failures: 0, #R errors: 1)
  
  Execution halted