CRAN Package Check Results for Package partykit

Last updated on 2022-01-23 22:49:49 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.2-15 14.44 351.69 366.13 OK
r-devel-linux-x86_64-debian-gcc 1.2-15 14.80 283.10 297.90 OK
r-devel-linux-x86_64-fedora-clang 1.2-15 446.70 OK
r-devel-linux-x86_64-fedora-gcc 1.2-15 458.46 OK
r-devel-windows-x86_64-new-UL 1.2-15 139.00 476.00 615.00 OK
r-devel-windows-x86_64-new-TK 1.2-15 WARN
r-patched-linux-x86_64 1.2-15 16.19 344.36 360.55 OK
r-release-linux-x86_64 1.2-15 15.48 340.93 356.41 OK
r-release-macos-arm64 1.2-15 OK
r-release-macos-x86_64 1.2-15 OK
r-release-windows-ix86+x86_64 1.2-15 32.00 561.00 593.00 OK
r-oldrel-macos-x86_64 1.2-15 OK
r-oldrel-windows-ix86+x86_64 1.2-15 31.00 557.00 588.00 OK

Check Details

Version: 1.2-15
Check: package dependencies
Result: NOTE
    Package suggested but not available for checking: 'AER'
Flavor: r-devel-windows-x86_64-new-TK

Version: 1.2-15
Check: running R code from vignettes
Result: WARN
    Errors in running code in vignettes:
    when running code in 'mob.Rnw'
    
    > suppressWarnings(RNGversion("3.5.2"))
    
    > library("partykit")
    Loading required package: grid
    Loading required package: libcoin
    Loading required package: mvtnorm
    
    > options(prompt = "R> ", continue = "+ ", digits = 4,
    + useFancyQuotes = FALSE)
    
    > data("PimaIndiansDiabetes", package = "mlbench")
    
    > pid_formula <- diabetes ~ glucose | pregnant + pressure +
    + triceps + insulin + mass + pedigree + age
    
    > logit <- function(y, x, start = NULL, weights = NULL,
    + offset = NULL, ...) {
    + glm(y ~ 0 + x, family = binomial, start = start, ...)
    + }
    
    > pid_tree <- mob(pid_formula, data = PimaIndiansDiabetes,
    + fit = logit)
    
    > pid_tree
    Model-based recursive partitioning (logit)
    
    Model formula:
    diabetes ~ glucose | pregnant + pressure + triceps + insulin +
     mass + pedigree + age
    
    Fitted party:
    [1] root
    | [2] mass <= 26.3: n = 167
    | x(Intercept) xglucose
    | -9.95151 0.05871
    | [3] mass > 26.3
    | | [4] age <= 30: n = 304
    | | x(Intercept) xglucose
    | | -6.70559 0.04684
    | | [5] age > 30: n = 297
    | | x(Intercept) xglucose
    | | -2.77095 0.02354
    
    Number of inner nodes: 2
    Number of terminal nodes: 3
    Number of parameters per node: 2
    Objective function: 355.5
    
    > pid_tree2 <- glmtree(diabetes ~ glucose | pregnant +
    + pressure + triceps + insulin + mass + pedigree + age, data = PimaIndiansDiabetes,
    + .... [TRUNCATED]
    
    > plot(pid_tree)
    
    > plot(pid_tree2, tp_args = list(ylines = 1, margins = c(1.5,
    + 1.5, 1.5, 2.5)))
    Loading required namespace: vcd
    
    > library("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
    
    > sctest(pid_tree, node = 1)
     pregnant pressure triceps insulin mass pedigree age
    statistic 2.989e+01 7.5024 15.94095 6.5969 4.881e+01 18.33476 4.351e+01
    p.value 9.779e-05 0.9104 0.06474 0.9701 8.317e-09 0.02253 1.183e-07
    
    > sctest(pid_tree, node = 2)
     pregnant pressure triceps insulin mass pedigree age
    statistic 10.3924 4.3537 5.9112 3.786 10.4749 3.626 6.0979
    p.value 0.4903 0.9998 0.9869 1.000 0.4785 1.000 0.9818
    
    > sctest(pid_tree, node = 3)
     pregnant pressure triceps insulin mass pedigree age
    statistic 2.674e+01 6.1758 7.3468 7.896 9.1546 17.96439 3.498e+01
    p.value 4.434e-04 0.9845 0.9226 0.870 0.7033 0.02647 8.099e-06
    
    > names(pid_tree$info)
    [1] "call" "formula" "Formula" "terms" "fit" "control" "dots"
    [8] "nreg"
    
    > names(pid_tree$node$info)
    [1] "coefficients" "objfun" "object" "nobs" "p.value"
    [6] "test"
    
    > print(pid_tree, node = 3)
    Model-based recursive partitioning (logit)
    -- Node 3 --
    
    Estimated parameters:
    x(Intercept) xglucose
     -4.61015 0.03426
    
    Objective function:
    344.2
    
    Parameter instability tests:
     pregnant pressure triceps insulin mass pedigree age
    statistic 2.674e+01 6.1758 7.3468 7.896 9.1546 17.96439 3.498e+01
    p.value 4.434e-04 0.9845 0.9226 0.870 0.7033 0.02647 8.099e-06
    
    > coef(pid_tree)
     x(Intercept) xglucose
    2 -9.952 0.05871
    4 -6.706 0.04684
    5 -2.771 0.02354
    
    > coef(pid_tree, node = 1)
    x(Intercept) xglucose
     -5.35008 0.03787
    
    > summary(pid_tree, node = 1)
    
    Call:
    glm(formula = y ~ 0 + x, family = binomial, start = start)
    
    Deviance Residuals:
     Min 1Q Median 3Q Max
    -2.110 -0.784 -0.536 0.857 3.273
    
    Coefficients:
     Estimate Std. Error z value Pr(>|z|)
    x(Intercept) -5.35008 0.42083 -12.7 <2e-16 ***
    xglucose 0.03787 0.00325 11.6 <2e-16 ***
    ---
    Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    
    (Dispersion parameter for binomial family taken to be 1)
    
     Null deviance: 1064.67 on 768 degrees of freedom
    Residual deviance: 808.72 on 766 degrees of freedom
    AIC: 812.7
    
    Number of Fisher Scoring iterations: 4
    
    
    > exp(coef(pid_tree)[, 2])
     2 4 5
    1.060 1.048 1.024
    
    > risk <- round(100 * (exp(coef(pid_tree)[, 2]) - 1),
    + digits = 1)
    
    > logLik(pid_tree)
    'log Lik.' -355.5 (df=8)
    
    > AIC(pid_tree)
    [1] 726.9
    
    > BIC(pid_tree)
    [1] 764.1
    
    > mean(residuals(pid_tree)^2)
    [1] 0.9257
    
    > deviance(pid_tree)/sum(weights(pid_tree))
    [1] 0.9257
    
    > deviance(pid_tree)/nobs(pid_tree)
    [1] 0.9257
    
    > pid <- head(PimaIndiansDiabetes)
    
    > predict(pid_tree, newdata = pid, type = "node")
    1 2 3 4 5 6
    5 5 2 4 5 2
    
    > width(pid_tree)
    [1] 3
    
    > depth(pid_tree)
    [1] 2
    
    > pid_tree[3]
    Model-based recursive partitioning (logit)
    
    Model formula:
    diabetes ~ glucose | pregnant + pressure + triceps + insulin +
     mass + pedigree + age
    
    Fitted party:
    [3] root
    | [4] age <= 30: n = 304
    | x(Intercept) xglucose
    | -6.70559 0.04684
    | [5] age > 30: n = 297
    | x(Intercept) xglucose
    | -2.77095 0.02354
    
    Number of inner nodes: 1
    Number of terminal nodes: 2
    Number of parameters per node: 2
    Objective function: 325.2
    
    > predict(pid_tree2, newdata = pid, type = "node")
    1 2 3 4 5 6
    5 5 2 4 5 2
    
    > predict(pid_tree2, newdata = pid, type = "response")
     1 2 3 4 5 6
    0.67092 0.31639 0.68827 0.07330 0.61146 0.04143
    
    > predict(pid_tree2, newdata = pid, type = "link")
     1 2 3 4 5 6
     0.7123 -0.7704 0.7920 -2.5371 0.4535 -3.1414
    
    > data("Journals", package = "AER")
    
     When sourcing 'mob.R':
    Error: there is no package called 'AER'
    Execution halted
    
     'constparty.Rnw'... OK
     'ctree.Rnw' using 'UTF-8'... OK
     'mob.Rnw'... failed
     'partykit.Rnw'... OK
Flavor: r-devel-windows-x86_64-new-TK

Version: 1.2-15
Check: re-building of vignette outputs
Result: NOTE
    Error(s) in re-building vignettes:
    --- re-building 'constparty.Rnw' using Sweave
    Loading required package: grid
    Loading required package: libcoin
    Loading required package: mvtnorm
    Loading required package: RWeka
    Loading required namespace: XML
    Loading required package: XML
    --- finished re-building 'constparty.Rnw'
    
    --- re-building 'ctree.Rnw' using Sweave
    Loading required package: coin
    Loading required package: survival
    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
    Loading required package: Formula
    Loading required package: modeltools
    Loading required package: stats4
    
    Attaching package: 'party'
    
    The following objects are masked from 'package:partykit':
    
     cforest, ctree, ctree_control, edge_simple, mob,
     mob_control, node_barplot, node_bivplot, node_boxplot,
     node_inner, node_surv, node_terminal, varimp
    
    --- finished re-building 'ctree.Rnw'
    
    --- re-building 'mob.Rnw' using Sweave
    Loading required namespace: vcd
    
    Error: processing vignette 'mob.Rnw' failed with diagnostics:
     chunk 26 (label = Journals-data)
    Error in find.package(package, lib.loc, verbose = verbose) :
     there is no package called 'AER'
    
    --- failed re-building 'mob.Rnw'
    
    --- re-building 'partykit.Rnw' using Sweave
    --- finished re-building 'partykit.Rnw'
    
    SUMMARY: processing the following file failed:
     'mob.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-windows-x86_64-new-TK