CRAN Package Check Results for Package brm

Last updated on 2020-02-19 10:48:48 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 1.0 3.85 23.34 27.19 ERROR
r-devel-linux-x86_64-debian-gcc 1.0 2.52 18.43 20.95 ERROR
r-devel-linux-x86_64-fedora-clang 1.0 32.89 ERROR
r-devel-linux-x86_64-fedora-gcc 1.0 31.72 ERROR
r-devel-windows-ix86+x86_64 1.0 7.00 37.00 44.00 OK
r-devel-windows-ix86+x86_64-gcc8 1.0 10.00 57.00 67.00 OK
r-patched-linux-x86_64 1.0 2.95 24.72 27.67 OK
r-patched-solaris-x86 1.0 48.90 OK
r-release-linux-x86_64 1.0 2.98 25.14 28.12 OK
r-release-windows-ix86+x86_64 1.0 5.00 34.00 39.00 OK
r-release-osx-x86_64 1.0 OK
r-oldrel-windows-ix86+x86_64 1.0 4.00 33.00 37.00 OK
r-oldrel-osx-x86_64 1.0 OK

Check Details

Version: 1.0
Check: examples
Result: ERROR
    Running examples in 'brm-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: brm
    > ### Title: Fitting Binary Regression Models
    > ### Aliases: brm
    >
    > ### ** Examples
    >
    > set.seed(0)
    > n = 100
    > alpha.true = c(0,-1)
    > beta.true = c(-0.5,1)
    > gamma.true = c(0.1,-0.5)
    > params.true = list(alpha.true=alpha.true, beta.true=beta.true,
    + gamma.true=gamma.true)
    > v.1 = rep(1,n) # intercept term
    > v.2 = runif(n,-2,2)
    > v = cbind(v.1,v.2)
    > pscore.true = exp(v %*% gamma.true) / (1+exp(v %*% gamma.true))
    > p0p1.true = t(mapply(getProbScalarRR,v %*% alpha.true,v %*% beta.true))
    > x = mapply(rbinom,rep(1,n),rep(1,n),pscore.true)
    > pA.true = p0p1.true[,1]
    > pA.true[x==1] = p0p1.true[x==1,2]
    > y = mapply(rbinom,rep(1,n),rep(1,n),pA.true)
    >
    > fit.mle = brm(y,x,v,v,'RR','MLE',v,TRUE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    brm
     --- call from context ---
    brm(y, x, v, v, "RR", "MLE", v, TRUE)
     --- call from argument ---
    if (class(va) == "formula") va = stats::model.matrix(va)
     --- R stacktrace ---
    where 1: brm(y, x, v, v, "RR", "MLE", v, TRUE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (y, x, va, vb = NULL, param, est.method = "MLE", vc = NULL,
     optimal = TRUE, weights = NULL, subset = NULL, max.step = 1000,
     thres = 1e-06, alpha.start = NULL, beta.start = NULL, message = FALSE)
    {
     if (is.null(vb))
     vb = va
     if (is.null(vc))
     vc = va
     if (class(va) == "formula")
     va = stats::model.matrix(va)
     if (class(vb) == "formula")
     vb = stats::model.matrix(vb)
     if (class(vc) == "formula")
     vc = stats::model.matrix(vc)
     if (is.null(weights))
     weights = rep(1, length(y))
     if (is.null(subset))
     subset = 1:length(y)
     ValidCheck(param, y, x, va, vb, vc, weights, subset, est.method,
     optimal, max.step, thres, alpha.start, beta.start)
     data = cbind(y, x, va, vb, vc, weights)[subset, ]
     subset = subset[rowSums(is.na(data)) == 0]
     y = y[subset]
     x = x[subset]
     va = va[subset, ]
     vb = vb[subset, ]
     vc = vc[subset, ]
     weights = weights[subset]
     pa = dim(va)[2]
     pb = dim(vb)[2]
     if (est.method == "MLE") {
     sol = MLEst(param, y, x, va, vb, weights, max.step, thres,
     alpha.start, beta.start, pa, pb)
     }
     if (est.method == "DR") {
     if (param == "OR") {
     cat("No doubly robust estimation methods for OR (with propensity score models) are available. Please refer to Tchetgen Tchetgen et al. (2010) for an alternative doubly robust estimation method. \n")
     return()
     }
     if (is.null(alpha.start) | is.null(beta.start)) {
     sol = MLEst(param, y, x, va, vb, weights, max.step,
     thres, alpha.start, beta.start, pa, pb)
     alpha.ml = sol$point.est[1:pa]
     beta.ml = sol$point.est[(pa + 1):(pa + pb)]
     beta.cov = sol$cov[(pa + 1):(pa + pb), (pa + 1):(pa +
     pb)]
     alpha.start = alpha.ml
     }
     else {
     alpha.ml = alpha.start
     beta.ml = beta.start
     beta.cov = matrix(NA, pb, pb)
     }
     gamma.fit = stats::glm(x ~ vc - 1, weight = weights,
     family = "binomial")
     gamma = gamma.fit$coefficients
     gamma.cov = summary(gamma.fit)$cov.unscaled
     sol = DREst(param, y, x, va, vb, vc, alpha.ml, beta.ml,
     gamma, optimal, weights, max.step, thres, alpha.start,
     beta.cov, gamma.cov, message)
     }
     return(sol)
    }
    <bytecode: 0x2618fc8>
    <environment: namespace:brm>
     --- function search by body ---
    Function brm in namespace brm has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(va) == "formula") va = stats::model.matrix(va) :
     the condition has length > 1
    Calls: brm
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 1.0
Check: examples
Result: ERROR
    Running examples in ‘brm-Ex.R’ failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: brm
    > ### Title: Fitting Binary Regression Models
    > ### Aliases: brm
    >
    > ### ** Examples
    >
    > set.seed(0)
    > n = 100
    > alpha.true = c(0,-1)
    > beta.true = c(-0.5,1)
    > gamma.true = c(0.1,-0.5)
    > params.true = list(alpha.true=alpha.true, beta.true=beta.true,
    + gamma.true=gamma.true)
    > v.1 = rep(1,n) # intercept term
    > v.2 = runif(n,-2,2)
    > v = cbind(v.1,v.2)
    > pscore.true = exp(v %*% gamma.true) / (1+exp(v %*% gamma.true))
    > p0p1.true = t(mapply(getProbScalarRR,v %*% alpha.true,v %*% beta.true))
    > x = mapply(rbinom,rep(1,n),rep(1,n),pscore.true)
    > pA.true = p0p1.true[,1]
    > pA.true[x==1] = p0p1.true[x==1,2]
    > y = mapply(rbinom,rep(1,n),rep(1,n),pA.true)
    >
    > fit.mle = brm(y,x,v,v,'RR','MLE',v,TRUE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    brm
     --- call from context ---
    brm(y, x, v, v, "RR", "MLE", v, TRUE)
     --- call from argument ---
    if (class(va) == "formula") va = stats::model.matrix(va)
     --- R stacktrace ---
    where 1: brm(y, x, v, v, "RR", "MLE", v, TRUE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (y, x, va, vb = NULL, param, est.method = "MLE", vc = NULL,
     optimal = TRUE, weights = NULL, subset = NULL, max.step = 1000,
     thres = 1e-06, alpha.start = NULL, beta.start = NULL, message = FALSE)
    {
     if (is.null(vb))
     vb = va
     if (is.null(vc))
     vc = va
     if (class(va) == "formula")
     va = stats::model.matrix(va)
     if (class(vb) == "formula")
     vb = stats::model.matrix(vb)
     if (class(vc) == "formula")
     vc = stats::model.matrix(vc)
     if (is.null(weights))
     weights = rep(1, length(y))
     if (is.null(subset))
     subset = 1:length(y)
     ValidCheck(param, y, x, va, vb, vc, weights, subset, est.method,
     optimal, max.step, thres, alpha.start, beta.start)
     data = cbind(y, x, va, vb, vc, weights)[subset, ]
     subset = subset[rowSums(is.na(data)) == 0]
     y = y[subset]
     x = x[subset]
     va = va[subset, ]
     vb = vb[subset, ]
     vc = vc[subset, ]
     weights = weights[subset]
     pa = dim(va)[2]
     pb = dim(vb)[2]
     if (est.method == "MLE") {
     sol = MLEst(param, y, x, va, vb, weights, max.step, thres,
     alpha.start, beta.start, pa, pb)
     }
     if (est.method == "DR") {
     if (param == "OR") {
     cat("No doubly robust estimation methods for OR (with propensity score models) are available. Please refer to Tchetgen Tchetgen et al. (2010) for an alternative doubly robust estimation method. \n")
     return()
     }
     if (is.null(alpha.start) | is.null(beta.start)) {
     sol = MLEst(param, y, x, va, vb, weights, max.step,
     thres, alpha.start, beta.start, pa, pb)
     alpha.ml = sol$point.est[1:pa]
     beta.ml = sol$point.est[(pa + 1):(pa + pb)]
     beta.cov = sol$cov[(pa + 1):(pa + pb), (pa + 1):(pa +
     pb)]
     alpha.start = alpha.ml
     }
     else {
     alpha.ml = alpha.start
     beta.ml = beta.start
     beta.cov = matrix(NA, pb, pb)
     }
     gamma.fit = stats::glm(x ~ vc - 1, weight = weights,
     family = "binomial")
     gamma = gamma.fit$coefficients
     gamma.cov = summary(gamma.fit)$cov.unscaled
     sol = DREst(param, y, x, va, vb, vc, alpha.ml, beta.ml,
     gamma, optimal, weights, max.step, thres, alpha.start,
     beta.cov, gamma.cov, message)
     }
     return(sol)
    }
    <bytecode: 0x55b8b656e548>
    <environment: namespace:brm>
     --- function search by body ---
    Function brm in namespace brm has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(va) == "formula") va = stats::model.matrix(va) :
     the condition has length > 1
    Calls: brm
    Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc

Version: 1.0
Check: examples
Result: ERROR
    Running examples in ‘brm-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: brm
    > ### Title: Fitting Binary Regression Models
    > ### Aliases: brm
    >
    > ### ** Examples
    >
    > set.seed(0)
    > n = 100
    > alpha.true = c(0,-1)
    > beta.true = c(-0.5,1)
    > gamma.true = c(0.1,-0.5)
    > params.true = list(alpha.true=alpha.true, beta.true=beta.true,
    + gamma.true=gamma.true)
    > v.1 = rep(1,n) # intercept term
    > v.2 = runif(n,-2,2)
    > v = cbind(v.1,v.2)
    > pscore.true = exp(v %*% gamma.true) / (1+exp(v %*% gamma.true))
    > p0p1.true = t(mapply(getProbScalarRR,v %*% alpha.true,v %*% beta.true))
    > x = mapply(rbinom,rep(1,n),rep(1,n),pscore.true)
    > pA.true = p0p1.true[,1]
    > pA.true[x==1] = p0p1.true[x==1,2]
    > y = mapply(rbinom,rep(1,n),rep(1,n),pA.true)
    >
    > fit.mle = brm(y,x,v,v,'RR','MLE',v,TRUE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    brm
     --- call from context ---
    brm(y, x, v, v, "RR", "MLE", v, TRUE)
     --- call from argument ---
    if (class(va) == "formula") va = stats::model.matrix(va)
     --- R stacktrace ---
    where 1: brm(y, x, v, v, "RR", "MLE", v, TRUE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (y, x, va, vb = NULL, param, est.method = "MLE", vc = NULL,
     optimal = TRUE, weights = NULL, subset = NULL, max.step = 1000,
     thres = 1e-06, alpha.start = NULL, beta.start = NULL, message = FALSE)
    {
     if (is.null(vb))
     vb = va
     if (is.null(vc))
     vc = va
     if (class(va) == "formula")
     va = stats::model.matrix(va)
     if (class(vb) == "formula")
     vb = stats::model.matrix(vb)
     if (class(vc) == "formula")
     vc = stats::model.matrix(vc)
     if (is.null(weights))
     weights = rep(1, length(y))
     if (is.null(subset))
     subset = 1:length(y)
     ValidCheck(param, y, x, va, vb, vc, weights, subset, est.method,
     optimal, max.step, thres, alpha.start, beta.start)
     data = cbind(y, x, va, vb, vc, weights)[subset, ]
     subset = subset[rowSums(is.na(data)) == 0]
     y = y[subset]
     x = x[subset]
     va = va[subset, ]
     vb = vb[subset, ]
     vc = vc[subset, ]
     weights = weights[subset]
     pa = dim(va)[2]
     pb = dim(vb)[2]
     if (est.method == "MLE") {
     sol = MLEst(param, y, x, va, vb, weights, max.step, thres,
     alpha.start, beta.start, pa, pb)
     }
     if (est.method == "DR") {
     if (param == "OR") {
     cat("No doubly robust estimation methods for OR (with propensity score models) are available. Please refer to Tchetgen Tchetgen et al. (2010) for an alternative doubly robust estimation method. \n")
     return()
     }
     if (is.null(alpha.start) | is.null(beta.start)) {
     sol = MLEst(param, y, x, va, vb, weights, max.step,
     thres, alpha.start, beta.start, pa, pb)
     alpha.ml = sol$point.est[1:pa]
     beta.ml = sol$point.est[(pa + 1):(pa + pb)]
     beta.cov = sol$cov[(pa + 1):(pa + pb), (pa + 1):(pa +
     pb)]
     alpha.start = alpha.ml
     }
     else {
     alpha.ml = alpha.start
     beta.ml = beta.start
     beta.cov = matrix(NA, pb, pb)
     }
     gamma.fit = stats::glm(x ~ vc - 1, weight = weights,
     family = "binomial")
     gamma = gamma.fit$coefficients
     gamma.cov = summary(gamma.fit)$cov.unscaled
     sol = DREst(param, y, x, va, vb, vc, alpha.ml, beta.ml,
     gamma, optimal, weights, max.step, thres, alpha.start,
     beta.cov, gamma.cov, message)
     }
     return(sol)
    }
    <bytecode: 0x2e8e440>
    <environment: namespace:brm>
     --- function search by body ---
    Function brm in namespace brm has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(va) == "formula") va = stats::model.matrix(va) :
     the condition has length > 1
    Calls: brm
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang

Version: 1.0
Check: examples
Result: ERROR
    Running examples in ‘brm-Ex.R’ failed
    The error most likely occurred in:
    
    > ### Name: brm
    > ### Title: Fitting Binary Regression Models
    > ### Aliases: brm
    >
    > ### ** Examples
    >
    > set.seed(0)
    > n = 100
    > alpha.true = c(0,-1)
    > beta.true = c(-0.5,1)
    > gamma.true = c(0.1,-0.5)
    > params.true = list(alpha.true=alpha.true, beta.true=beta.true,
    + gamma.true=gamma.true)
    > v.1 = rep(1,n) # intercept term
    > v.2 = runif(n,-2,2)
    > v = cbind(v.1,v.2)
    > pscore.true = exp(v %*% gamma.true) / (1+exp(v %*% gamma.true))
    > p0p1.true = t(mapply(getProbScalarRR,v %*% alpha.true,v %*% beta.true))
    > x = mapply(rbinom,rep(1,n),rep(1,n),pscore.true)
    > pA.true = p0p1.true[,1]
    > pA.true[x==1] = p0p1.true[x==1,2]
    > y = mapply(rbinom,rep(1,n),rep(1,n),pA.true)
    >
    > fit.mle = brm(y,x,v,v,'RR','MLE',v,TRUE)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    brm
     --- call from context ---
    brm(y, x, v, v, "RR", "MLE", v, TRUE)
     --- call from argument ---
    if (class(va) == "formula") va = stats::model.matrix(va)
     --- R stacktrace ---
    where 1: brm(y, x, v, v, "RR", "MLE", v, TRUE)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (y, x, va, vb = NULL, param, est.method = "MLE", vc = NULL,
     optimal = TRUE, weights = NULL, subset = NULL, max.step = 1000,
     thres = 1e-06, alpha.start = NULL, beta.start = NULL, message = FALSE)
    {
     if (is.null(vb))
     vb = va
     if (is.null(vc))
     vc = va
     if (class(va) == "formula")
     va = stats::model.matrix(va)
     if (class(vb) == "formula")
     vb = stats::model.matrix(vb)
     if (class(vc) == "formula")
     vc = stats::model.matrix(vc)
     if (is.null(weights))
     weights = rep(1, length(y))
     if (is.null(subset))
     subset = 1:length(y)
     ValidCheck(param, y, x, va, vb, vc, weights, subset, est.method,
     optimal, max.step, thres, alpha.start, beta.start)
     data = cbind(y, x, va, vb, vc, weights)[subset, ]
     subset = subset[rowSums(is.na(data)) == 0]
     y = y[subset]
     x = x[subset]
     va = va[subset, ]
     vb = vb[subset, ]
     vc = vc[subset, ]
     weights = weights[subset]
     pa = dim(va)[2]
     pb = dim(vb)[2]
     if (est.method == "MLE") {
     sol = MLEst(param, y, x, va, vb, weights, max.step, thres,
     alpha.start, beta.start, pa, pb)
     }
     if (est.method == "DR") {
     if (param == "OR") {
     cat("No doubly robust estimation methods for OR (with propensity score models) are available. Please refer to Tchetgen Tchetgen et al. (2010) for an alternative doubly robust estimation method. \n")
     return()
     }
     if (is.null(alpha.start) | is.null(beta.start)) {
     sol = MLEst(param, y, x, va, vb, weights, max.step,
     thres, alpha.start, beta.start, pa, pb)
     alpha.ml = sol$point.est[1:pa]
     beta.ml = sol$point.est[(pa + 1):(pa + pb)]
     beta.cov = sol$cov[(pa + 1):(pa + pb), (pa + 1):(pa +
     pb)]
     alpha.start = alpha.ml
     }
     else {
     alpha.ml = alpha.start
     beta.ml = beta.start
     beta.cov = matrix(NA, pb, pb)
     }
     gamma.fit = stats::glm(x ~ vc - 1, weight = weights,
     family = "binomial")
     gamma = gamma.fit$coefficients
     gamma.cov = summary(gamma.fit)$cov.unscaled
     sol = DREst(param, y, x, va, vb, vc, alpha.ml, beta.ml,
     gamma, optimal, weights, max.step, thres, alpha.start,
     beta.cov, gamma.cov, message)
     }
     return(sol)
    }
    <bytecode: 0x12b26b0>
    <environment: namespace:brm>
     --- function search by body ---
    Function brm in namespace brm has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(va) == "formula") va = stats::model.matrix(va) :
     the condition has length > 1
    Calls: brm
    Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc