Last updated on 2020-02-10 07:51:53 CET.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 1.5-1 | 14.04 | 125.03 | 139.07 | ERROR | |
r-devel-linux-x86_64-debian-gcc | 1.5-1 | 10.71 | 95.17 | 105.88 | ERROR | |
r-devel-linux-x86_64-fedora-clang | 1.5-1 | 169.71 | ERROR | |||
r-devel-linux-x86_64-fedora-gcc | 1.5-1 | 174.80 | ERROR | |||
r-devel-windows-ix86+x86_64 | 1.5-1 | 37.00 | 153.00 | 190.00 | OK | |
r-devel-windows-ix86+x86_64-gcc8 | 1.5-1 | 41.00 | 153.00 | 194.00 | OK | |
r-patched-linux-x86_64 | 1.5-1 | 13.13 | 125.68 | 138.81 | OK | |
r-patched-solaris-x86 | 1.5-1 | 230.40 | OK | |||
r-release-linux-x86_64 | 1.5-1 | 13.51 | 126.86 | 140.37 | OK | |
r-release-windows-ix86+x86_64 | 1.5-1 | 28.00 | 144.00 | 172.00 | OK | |
r-release-osx-x86_64 | 1.5-1 | OK | ||||
r-oldrel-windows-ix86+x86_64 | 1.5-1 | 13.00 | 182.00 | 195.00 | OK | |
r-oldrel-osx-x86_64 | 1.5-1 | OK |
Version: 1.5-1
Check: examples
Result: ERROR
Running examples in 'sensR-Ex.R' failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: clm2twoAC
> ### Title: Extract 2-AC coefficient table from a cumulative link model
> ### Aliases: clm2twoAC
> ### Keywords: models
>
> ### ** Examples
>
>
> ## Example of a simple 2-AC model. First the conventional way:
> twoAC(c(2, 2, 6))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x9d1b4e0>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.5-1
Check: tests
Result: ERROR
Running 'betabin.R' [3s/4s]
Comparing 'betabin.Rout' to 'betabin.Rout.save' ... OK
Running 'discrim.R' [2s/3s]
Comparing 'discrim.Rout' to 'discrim.Rout.save' ... OK
Running 'test-all.R' [9s/12s]
Running 'testdouble.R' [3s/4s]
Running 'twoAC.R' [3s/5s]
Running the tests in 'tests/twoAC.R' failed.
Complete output:
> library(sensR)
>
> ## Testing border line cases:
> twoAC(c(5, 0, 15))
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 2.287737 p-value = 0.022153
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 5, 15))
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 15, 0))
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 0))
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 0, 15))
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 5, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 15, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 0, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
>
> ## Testing twoAC functions:
> (fm1 <- twoAC(c(2, 2, 6)))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x9309588>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.5-1
Check: re-building of vignette outputs
Result: WARN
Error(s) in re-building vignettes:
...
--- re-building 'methodology.Rnw' using Sweave
--- finished re-building 'methodology.Rnw'
--- re-building 'twoACexamples.Rnw' using Sweave
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
cat("\n")
sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
engine$weave(file, quiet = quiet, encoding = enc)
setwd(startdir)
output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {
texi2pdf(file = output, clean = FALSE, quiet = quiet)
output <- find_vignette_product(name, by = "texi2pdf",
engine = engine)
}
}, error = function(e) {
OK <<- FALSE
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
file, conditionMessage(e)))
})
where 21: tools:::.buildOneVignette("twoACexamples.Rnw", "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/sensR.Rcheck/vign_test/sensR",
TRUE, FALSE, "twoACexamples", "UTF-8", "/tmp/RtmpUEae3N/file2f483571095e.rds")
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0xa2614f8>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error: processing vignette 'twoACexamples.Rnw' failed with diagnostics:
chunk 2 (label = example1-1)
Error in if (class(vcov) != "try-error") { : the condition has length > 1
--- failed re-building 'twoACexamples.Rnw'
SUMMARY: processing the following file failed:
'twoACexamples.Rnw'
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-debian-clang
Version: 1.5-1
Check: examples
Result: ERROR
Running examples in ‘sensR-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: clm2twoAC
> ### Title: Extract 2-AC coefficient table from a cumulative link model
> ### Aliases: clm2twoAC
> ### Keywords: models
>
> ### ** Examples
>
>
> ## Example of a simple 2-AC model. First the conventional way:
> twoAC(c(2, 2, 6))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x5556e509ad90>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.5-1
Check: tests
Result: ERROR
Running ‘betabin.R’ [2s/4s]
Comparing ‘betabin.Rout’ to ‘betabin.Rout.save’ ... OK
Running ‘discrim.R’ [2s/3s]
Comparing ‘discrim.Rout’ to ‘discrim.Rout.save’ ... OK
Running ‘test-all.R’ [7s/10s]
Running ‘testdouble.R’ [2s/4s]
Running ‘twoAC.R’ [3s/4s]
Running the tests in ‘tests/twoAC.R’ failed.
Complete output:
> library(sensR)
>
> ## Testing border line cases:
> twoAC(c(5, 0, 15))
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 2.287737 p-value = 0.022153
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 5, 15))
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 15, 0))
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 0))
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 0, 15))
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 5, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 15, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 0, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
>
> ## Testing twoAC functions:
> (fm1 <- twoAC(c(2, 2, 6)))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x55f2256588a0>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.5-1
Check: re-building of vignette outputs
Result: WARN
Error(s) in re-building vignettes:
...
--- re-building ‘methodology.Rnw’ using Sweave
--- finished re-building ‘methodology.Rnw’
--- re-building ‘twoACexamples.Rnw’ using Sweave
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
cat("\n")
sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
engine$weave(file, quiet = quiet, encoding = enc)
setwd(startdir)
output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {
texi2pdf(file = output, clean = FALSE, quiet = quiet)
output <- find_vignette_product(name, by = "texi2pdf",
engine = engine)
}
}, error = function(e) {
OK <<- FALSE
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
file, conditionMessage(e)))
})
where 21: tools:::.buildOneVignette("twoACexamples.Rnw", "/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/sensR.Rcheck/vign_test/sensR",
TRUE, FALSE, "twoACexamples", "UTF-8", "/home/hornik/tmp/scratch/RtmpImYe2X/file50ce239d235e.rds")
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x559ae0db08e8>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error: processing vignette 'twoACexamples.Rnw' failed with diagnostics:
chunk 2 (label = example1-1)
Error in if (class(vcov) != "try-error") { : the condition has length > 1
--- failed re-building ‘twoACexamples.Rnw’
SUMMARY: processing the following file failed:
‘twoACexamples.Rnw’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.5-1
Check: examples
Result: ERROR
Running examples in ‘sensR-Ex.R’ failed
The error most likely occurred in:
> ### Name: clm2twoAC
> ### Title: Extract 2-AC coefficient table from a cumulative link model
> ### Aliases: clm2twoAC
> ### Keywords: models
>
> ### ** Examples
>
>
> ## Example of a simple 2-AC model. First the conventional way:
> twoAC(c(2, 2, 6))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x9aa7ea0>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.5-1
Check: tests
Result: ERROR
Running ‘betabin.R’
Comparing ‘betabin.Rout’ to ‘betabin.Rout.save’ ... OK
Running ‘discrim.R’
Comparing ‘discrim.Rout’ to ‘discrim.Rout.save’ ... OK
Running ‘test-all.R’ [11s/13s]
Running ‘testdouble.R’
Running ‘twoAC.R’
Running the tests in ‘tests/twoAC.R’ failed.
Complete output:
> library(sensR)
>
> ## Testing border line cases:
> twoAC(c(5, 0, 15))
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 2.287737 p-value = 0.022153
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 5, 15))
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 15, 0))
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 0))
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 0, 15))
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 5, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 15, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 0, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
>
> ## Testing twoAC functions:
> (fm1 <- twoAC(c(2, 2, 6)))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0x942c748>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.5-1
Check: re-building of vignette outputs
Result: WARN
Error(s) in re-building vignettes:
--- re-building ‘methodology.Rnw’ using Sweave
--- finished re-building ‘methodology.Rnw’
--- re-building ‘twoACexamples.Rnw’ using Sweave
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
cat("\n")
sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
engine$weave(file, quiet = quiet, encoding = enc)
setwd(startdir)
output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {
texi2pdf(file = output, clean = FALSE, quiet = quiet)
output <- find_vignette_product(name, by = "texi2pdf",
engine = engine)
}
}, error = function(e) {
OK <<- FALSE
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
file, conditionMessage(e)))
})
where 21: tools:::.buildOneVignette("twoACexamples.Rnw", "/data/gannet/ripley/R/packages/tests-clang/sensR.Rcheck/vign_test/sensR",
TRUE, FALSE, "twoACexamples", "UTF-8", "/tmp/RtmpEmtQAe/working_dir/RtmpxUonYZ/file2bfc6fbe2cd7.rds")
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0xab92a70>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error: processing vignette 'twoACexamples.Rnw' failed with diagnostics:
chunk 2 (label = example1-1)
Error in if (class(vcov) != "try-error") { : the condition has length > 1
--- failed re-building ‘twoACexamples.Rnw’
SUMMARY: processing the following file failed:
‘twoACexamples.Rnw’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.5-1
Check: examples
Result: ERROR
Running examples in ‘sensR-Ex.R’ failed
The error most likely occurred in:
> ### Name: clm2twoAC
> ### Title: Extract 2-AC coefficient table from a cumulative link model
> ### Aliases: clm2twoAC
> ### Keywords: models
>
> ### ** Examples
>
>
> ## Example of a simple 2-AC model. First the conventional way:
> twoAC(c(2, 2, 6))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0xafb0798>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 1.5-1
Check: tests
Result: ERROR
Running ‘betabin.R’ [4s/11s]
Comparing ‘betabin.Rout’ to ‘betabin.Rout.save’ ... OK
Running ‘discrim.R’
Comparing ‘discrim.Rout’ to ‘discrim.Rout.save’ ... OK
Running ‘test-all.R’ [11s/31s]
Running ‘testdouble.R’
Running ‘twoAC.R’ [4s/11s]
Running the tests in ‘tests/twoAC.R’ failed.
Complete output:
> library(sensR)
>
> ## Testing border line cases:
> twoAC(c(5, 0, 15))
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 2.287737 p-value = 0.022153
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 15):
Estimate Std. Error
tau 0.0000 NA
d.prime 0.9539 NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 5, 15))
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 15, 0))
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(5, 0, 0))
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = -2.632769 p-value = 0.0084692
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 0, 15))
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test:
Likelihood root statistic = 4.560089 p-value = 5.1132e-06
Alternative hypothesis: d-prime is different from 0
> twoAC(c(0, 5, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 5, 15):
Estimate Std. Error
tau NA NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 15, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 15, 0):
Estimate Std. Error
tau NA NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(5, 0, 0), stat = "Wald")
Results for the 2-AC protocol with data c(5, 0, 0):
Estimate Std. Error
tau 0 NA
d.prime -Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
> twoAC(c(0, 0, 15), stat = "Wald")
Results for the 2-AC protocol with data c(0, 0, 15):
Estimate Std. Error
tau 0 NA
d.prime Inf NA
Use profile and confint methods to get confidence interval
Significance test not available - try with the likelihood statistic
>
> ## Testing twoAC functions:
> (fm1 <- twoAC(c(2, 2, 6)))
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0xa720438>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error in if (class(vcov) != "try-error") { : the condition has length > 1
Calls: twoAC -> estimate.2AC
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc
Version: 1.5-1
Check: re-building of vignette outputs
Result: WARN
Error(s) in re-building vignettes:
--- re-building ‘methodology.Rnw’ using Sweave
--- finished re-building ‘methodology.Rnw’
--- re-building ‘twoACexamples.Rnw’ using Sweave
----------- FAILURE REPORT --------------
--- failure: the condition has length > 1 ---
--- srcref ---
:
--- package (from environment) ---
sensR
--- call from context ---
estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
--- call from argument ---
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
--- R stacktrace ---
where 1: estimate.2AC(data = data, vcov = TRUE, warn = FALSE)
where 2: twoAC(c(2, 2, 6))
where 3: eval(expr, .GlobalEnv)
where 4: eval(expr, .GlobalEnv)
where 5: withVisible(eval(expr, .GlobalEnv))
where 6: doTryCatch(return(expr), name, parentenv, handler)
where 7: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 8: tryCatchList(expr, classes, parentenv, handlers)
where 9: tryCatch(expr, error = function(e) {
call <- conditionCall(e)
if (!is.null(call)) {
if (identical(call[[1L]], quote(doTryCatch)))
call <- sys.call(-4L)
dcall <- deparse(call)[1L]
prefix <- paste("Error in", dcall, ": ")
LONG <- 75L
sm <- strsplit(conditionMessage(e), "\n")[[1L]]
w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
if (is.na(w))
w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
type = "b")
if (w > LONG)
prefix <- paste0(prefix, "\n ")
}
else prefix <- "Error : "
msg <- paste0(prefix, conditionMessage(e), "\n")
.Internal(seterrmessage(msg[1L]))
if (!silent && isTRUE(getOption("show.error.messages"))) {
cat(msg, file = outFile)
.Internal(printDeferredWarnings())
}
invisible(structure(msg, class = "try-error", condition = e))
})
where 10: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
where 11: evalFunc(ce, options)
where 12: tryCatchList(expr, classes, parentenv, handlers)
where 13: tryCatch(evalFunc(ce, options), finally = {
cat("\n")
sink()
})
where 14: driver$runcode(drobj, chunk, chunkopts)
where 15: utils::Sweave(...)
where 16: engine$weave(file, quiet = quiet, encoding = enc)
where 17: doTryCatch(return(expr), name, parentenv, handler)
where 18: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 19: tryCatchList(expr, classes, parentenv, handlers)
where 20: tryCatch({
engine$weave(file, quiet = quiet, encoding = enc)
setwd(startdir)
output <- find_vignette_product(name, by = "weave", engine = engine)
if (!have.makefile && vignette_is_tex(output)) {
texi2pdf(file = output, clean = FALSE, quiet = quiet)
output <- find_vignette_product(name, by = "texi2pdf",
engine = engine)
}
}, error = function(e) {
OK <<- FALSE
message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
file, conditionMessage(e)))
})
where 21: tools:::.buildOneVignette("twoACexamples.Rnw", "/data/gannet/ripley/R/packages/tests-devel/sensR.Rcheck/vign_test/sensR",
TRUE, FALSE, "twoACexamples", "UTF-8", "/tmp/RtmpRPq9Yj/working_dir/RtmpR4PFRM/file37bd3142bb82.rds")
--- value of length: 2 type: logical ---
[1] TRUE TRUE
--- function from context ---
function (data, vcov = TRUE, warn = TRUE)
{
vcov <- as.logical(vcov)
stopifnot(is.logical(vcov))
nll <- function(par) {
tau <- par[1]
d.prime <- par[2]
p1 <- pnorm(-tau, d.prime, sqrt(2))
p12 <- pnorm(tau, d.prime, sqrt(2))
prob <- c(p1, p12 - p1, 1 - p12)
prob[prob <= 0] <- 1
-sum(data * log(prob))
}
x <- data
if (x[1] > 0 && x[2] == 0 && x[3] == 0) {
tau <- 0
d.prime <- -Inf
}
else if (x[1] == 0 && x[2] > 0 && x[3] == 0) {
tau <- NA
d.prime <- NA
}
else if (x[1] == 0 && x[2] == 0 && x[3] > 0) {
tau <- 0
d.prime <- Inf
}
else if (x[1] > 0 && x[2] > 0 && x[3] == 0) {
d.prime <- -Inf
tau <- NA
}
else if (x[1] == 0 && x[2] > 0 && x[3] > 0) {
d.prime <- Inf
tau <- NA
}
else {
prob <- data/sum(data)
gamma <- cumsum(prob)[-3]
z <- qnorm(gamma) * sqrt(2)
tau <- (z[2] - z[1])/2
d.prime <- -z[1] - tau
}
prob <- data/sum(data)
prob[prob <= 0] <- 1
logLikMax <- sum(data * log(prob))
coef <- matrix(NA, 2, 2, dimnames = list(c("tau", "d.prime"),
c("Estimate", "Std. Error")))
coef[, 1] <- c(tau, d.prime)
res <- list(coefficients = coef, data = data, logLik = logLikMax)
if (vcov) {
makeWarn <- TRUE
if (all(is.finite(coef[, 1])) && tau > 0) {
makeWarn <- FALSE
hess <- hessian(nll, x = c(tau, d.prime), method = "Richardson",
method.args = list())
vcov <- try(solve(hess), silent = TRUE)
if (class(vcov) != "try-error") {
makeWarn <- TRUE
res$coefficients[, 2] <- sqrt(diag(vcov))
res$vcov <- vcov
}
}
if (warn && makeWarn)
warning("vcov and standard errors are not available",
call. = FALSE)
}
return(res)
}
<bytecode: 0xac180a0>
<environment: namespace:sensR>
--- function search by body ---
Function estimate.2AC in namespace sensR has this body.
----------- END OF FAILURE REPORT --------------
Error: processing vignette 'twoACexamples.Rnw' failed with diagnostics:
chunk 2 (label = example1-1)
Error in if (class(vcov) != "try-error") { : the condition has length > 1
--- failed re-building ‘twoACexamples.Rnw’
SUMMARY: processing the following file failed:
‘twoACexamples.Rnw’
Error: Vignette re-building failed.
Execution halted
Flavor: r-devel-linux-x86_64-fedora-gcc