CRAN Package Check Results for Package drgee

Last updated on 2019-12-15 05:47:37 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.1.9 29.50 70.23 99.73 ERROR
r-devel-linux-x86_64-debian-gcc 1.1.9 20.97 54.31 75.28 OK
r-devel-linux-x86_64-fedora-clang 1.1.9 121.12 OK
r-devel-linux-x86_64-fedora-gcc 1.1.9 116.80 OK
r-devel-windows-ix86+x86_64 1.1.9 47.00 144.00 191.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.1.9 59.00 153.00 212.00 OK
r-patched-linux-x86_64 1.1.9 20.94 61.69 82.63 OK
r-patched-solaris-x86 1.1.9 147.00 OK
r-release-linux-x86_64 1.1.9 22.66 62.17 84.83 OK
r-release-windows-ix86+x86_64 1.1.9 49.00 98.00 147.00 OK
r-release-osx-x86_64 1.1.9 OK
r-oldrel-windows-ix86+x86_64 1.1.9 42.00 93.00 135.00 OK
r-oldrel-osx-x86_64 1.1.9 OK

Check Details

Version: 1.1.9
Check: examples
Result: ERROR
    Running examples in 'drgee-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: drgee
    > ### Title: Doubly Robust Generalized Estimating Equations
    > ### Aliases: drgee coef.drgee vcov.drgee print.drgee summary.drgee
    > ### print.summary.drgee clusterRobustVcov.drgee
    > ### Keywords: models regression cluster
    >
    > ### ** Examples
    >
    >
    > ## DR-estimation when
    > ## the main model is
    > ## E(Y|A,L1,L2)-E(Y|A=0,L1,L2)=beta0*A+beta1*A*L1
    > ## and the outcome nuisance model is
    > ## E(Y|A=0,L1,L2)=gamma0+gamma1*L1+gamma2*L2
    > ## and the exposure nuisance model is
    > ## E(A|Y=0,L1,L2)=expit(alpha0+alpha1*L1+alpha2*l2)
    >
    > library(drgee)
    >
    > expit<-function(x) exp(x)/(1+exp(x))
    >
    > n<-5000
    >
    > ## nuisance
    > l1<-rnorm(n, mean = 0, sd = 1)
    > l2<-rnorm(n, mean = 0, sd = 1)
    >
    > beta0<-1.5
    > beta1<-1
    > gamma0<--1
    > gamma1<--2
    > gamma2<-2
    > alpha0<-1
    > alpha1<-5
    > alpha2<-3
    >
    > ## Exposure generated from the exposure nuisance model
    > a<-rbinom(n,1,expit(alpha0 + alpha1*l1 + alpha2*l2))
    > ## Outcome generated from the main model and the
    > ## outcome nuisance model
    > y<-rnorm(n,
    + mean = beta0 * a + beta1 * a * l1 + gamma0 + gamma1 * l1 + gamma2 * l2,
    + sd = 1)
    >
    > simdata<-data.frame(y,a,l1,l2)
    >
    > ## outcome nuisance model misspecified and
    > ## exposure nuisance model correctly specified
    >
    > ## DR-estimation
    > dr.est <- drgee(oformula = formula(y~l1),
    + eformula = formula(a~l1+l2),
    + iaformula = formula(~l1),
    + olink = "identity", elink = "logit",
    + data = simdata, estimation.method = "dr")
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    drgee
     --- call from context ---
    robustVcov(fit$U, fit$d.U.sum, drgee.data$id.vcov)
     --- call from argument ---
    if (class(inv.d.U) == "try-error") {
     vcov <- matrix(rep(NA, n.par^2), ncol = n.par)
    } else {
     vcov <- inv.d.U %*% cov(U, U) %*% t(inv.d.U)/n.clust
    }
     --- R stacktrace ---
    where 1: robustVcov(fit$U, fit$d.U.sum, drgee.data$id.vcov)
    where 2: as.matrix(robustVcov(fit$U, fit$d.U.sum, drgee.data$id.vcov))
    where 3: drgee(oformula = formula(y ~ l1), eformula = formula(a ~ l1 +
     l2), iaformula = formula(~l1), olink = "identity", elink = "logit",
     data = simdata, estimation.method = "dr")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (U, d.U.sum, id = NULL)
    {
     n.par <- ncol(d.U.sum)
     n.obs <- nrow(U)
     if (!is.null(id)) {
     n.clust <- length(unique(id))
     if (n.clust != n.obs) {
     U.dt <- as.data.table(cbind(id, U))
     names(U.dt) <- paste(c("id", 1:n.par))
     setkey(U.dt, id)
     U <- as.matrix(U.dt[, lapply(.SD, sum), by = id])[,
     -1]
     }
     }
     else {
     n.clust <- n.obs
     }
     d.U <- d.U.sum/n.clust
     inv.d.U <- try(solve(d.U))
     if (class(inv.d.U) == "try-error") {
     vcov <- matrix(rep(NA, n.par^2), ncol = n.par)
     }
     else {
     vcov <- inv.d.U %*% cov(U, U) %*% t(inv.d.U)/n.clust
     }
     return(vcov)
    }
    <bytecode: 0x8ef0dd0>
    <environment: namespace:drgee>
     --- function search by body ---
    Function robustVcov in namespace drgee has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(inv.d.U) == "try-error") { :
     the condition has length > 1
    Calls: drgee -> as.matrix -> robustVcov
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang