Running 'invariance.R' [12s]
  Running 'lavaan.R' [9s]
  Running 'tree.R' [15s]
  Running 'vim.R' [202s]
Running the tests in 'tests/vim.R' failed.
Complete output:
  > set.seed(789)
  > require("semtree")
  Loading required package: semtree
  Loading required package: OpenMx
  > data(lgcm)
  > 
  > lgcm$agegroup <- ordered(lgcm$agegroup)
  > lgcm$training <- factor(lgcm$training)
  > lgcm$noise <- as.numeric(lgcm$noise)
  > 
  > # LOAD IN OPENMX MODEL.
  > # A SIMPLE LINEAR GROWTH MODEL WITH 5 TIME POINTS FROM SIMULATED DATA
  > 
  > manifests <- names(lgcm)[1:5]
  > lgcModel <- mxModel("Linear Growth Curve Model Path Specification",
  +                             type="RAM",
  +                             manifestVars=manifests,
  +                             latentVars=c("intercept","slope"),
  +                             # residual variances
  +                             mxPath(
  +                               from=manifests,
  +                               arrows=2,
  +                               free=TRUE,
  +                               values = c(1, 1, 1, 1, 1),
  +                               labels=c("residual1","residual2","residual3","residual4","residual5")
  +                             ),
  +                             # latent variances and covariance
  +                             mxPath(
  +                               from=c("intercept","slope"),
  +                               connect="unique.pairs",
  +                               arrows=2,
  +                               free=TRUE,
  +                               values=c(1, 1, 1),
  +                               labels=c("vari", "cov", "vars")
  +                             ),
  +                             # intercept loadings
  +                             mxPath(
  +                               from="intercept",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(1, 1, 1, 1, 1)
  +                             ),
  +                             # slope loadings
  +                             mxPath(
  +                               from="slope",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(0, 1, 2, 3, 4)
  +                             ),
  +                             # manifest means
  +                             mxPath(
  +                               from="one",
  +                               to=manifests,
  +                               arrows=1,
  +                               free=FALSE,
  +                               values=c(0, 0, 0, 0, 0)
  +                             ),
  +                             # latent means
  +                             mxPath(
  +                               from="one",
  +                               to=c("intercept", "slope"),
  +                               arrows=1,
  +                               free=TRUE,
  +                               values=c(1, 1),
  +                               labels=c("meani", "means")
  +                             ),
  +                     mxData(lgcm,type="raw")
  +                     )
  > 
  > 
  > fr <- semforest(lgcModel, lgcm,control = semforest.control(num.trees = 3))
  
  Beginning initial fit attempt
  Fit attempt 0, fit=3946.79931515406, new current best! (was 12364.5789577388)
                                                                               
  ✖ Variable noise is numeric but has only few unique values. Consider recoding as ordered factor.
  
  Beginning initial fit attempt
  Fit attempt 0, fit=2498.76798638631, new current best! (was 2500.57559108838)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=764.772503388832, new current best! (was 1163.66565692752)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=416.837040482735, new current best! (was 421.064350450524)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=242.1898784002, new current best! (was 247.259525975154)
                                                                             
  
  Beginning initial fit attempt
  Fit attempt 0, fit=158.989241132224, new current best! (was 169.577514507592)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=338.86829582907, new current best! (was 343.70815293826)
                                                                             
  
  Beginning initial fit attempt
  Fit attempt 0, fit=175.851011833291, new current best! (was 178.737405935284)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=156.155329338793, new current best! (was 160.130889893778)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=934.355396742773, new current best! (was 1335.10232945885)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=447.459454932503, new current best! (was 473.567977425515)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=219.981280075357, new current best! (was 222.720927558137)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=221.207760644056, new current best! (was 224.738527374367)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=444.014715095661, new current best! (was 460.787419317237)
                                                                               
  ✔ Tree construction finished [took 7s].
  ✖ Variable noise is numeric but has only few unique values. Consider recoding as ordered factor.
  
  Beginning initial fit attempt
  Fit attempt 0, fit=2516.45260910031, new current best! (was 2517.92197891546)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=1341.27576506244, new current best! (was 1348.10677651569)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=648.879123954431, new current best! (was 651.186371334589)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=687.549815244804, new current best! (was 690.089393727809)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=1161.42709458488, new current best! (was 1168.3458325847)
                                                                              
  
  Beginning initial fit attempt
  Fit attempt 0, fit=704.468375444538, new current best! (was 708.478318229092)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=174.029367790211, new current best! (was 300.378316347096)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=279.420416612004, new current best! (was 404.090059097464)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=446.634272024559, new current best! (was 452.948776355769)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=106.498946931687, new current best! (was 206.168065426764)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=152.335816309091, new current best! (was 240.466206597789)
                                                                               
  ✔ Tree construction finished [took 6s].
  ✖ Variable noise is numeric but has only few unique values. Consider recoding as ordered factor.
  
  Beginning initial fit attempt
  Fit attempt 0, fit=2484.71604419057, new current best! (was 2486.93396959996)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=840.4783778385, new current best! (was 1270.02577063338)
                                                                             
  
  Beginning initial fit attempt
  Fit attempt 0, fit=445.01443432754, new current best! (was 452.40274702475)
                                                                             
  
  Beginning initial fit attempt
  Fit attempt 0, fit=377.657268989175, new current best! (was 388.0756308138)
                                                                             
  
  Beginning initial fit attempt
  Fit attempt 0, fit=827.235462979427, new current best! (was 1214.69027355731)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=421.274902028199, new current best! (was 425.650100878236)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=192.799639085626, new current best! (was 203.327807843845)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=209.819695597855, new current best! (was 217.947094184346)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=395.839153642424, new current best! (was 401.585362101185)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=194.650830045822, new current best! (was 201.291087693286)
                                                                               
  
  Beginning initial fit attempt
  Fit attempt 0, fit=188.88314455398, new current best! (was 194.548065949138)
                                                                              
  ✔ Tree construction finished [took 6s].
  ✔ Forest completed [took 20s]
  > 
  >   
  > vimp <- varimp(fr)
  > 
  > print(vimp)
  Variable Importance
     agegroup    training       noise 
  6750.523586   34.849477   -4.840521 
  > print(vimp, na.omit=TRUE)
  Variable Importance
     agegroup    training       noise 
  6750.523586   34.849477   -4.840521 
  > 
  > varimpConvergencePlot(vimp, aggregate="mean")
  > varimpConvergencePlot(vimp, aggregate="median")
  > 
  > 
  > proc.time()
     user  system elapsed 
    27.09    0.75   27.85