Last updated on 2025-09-13 00:51:28 CEST.
Package | ERROR | OK |
---|---|---|
horseshoe | 3 | 10 |
Current CRAN status: ERROR: 3, OK: 10
Version: 0.2.0
Check: examples
Result: ERROR
Running examples in ‘horseshoe-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: HS.normal.means
> ### Title: The horseshoe prior for the sparse normal means problem
> ### Aliases: HS.normal.means
>
> ### ** Examples
>
> #Empirical Bayes example with 20 signals, rest is noise
> #Posterior mean for the signals is plotted
> #And variable selection is performed using the credible intervals
> #And the credible intervals are plotted
> truth <- c(rep(0, 80), rep(8, 20))
> data <- truth + rnorm(100, 1)
> tau.hat <- HS.MMLE(data, Sigma2 = 1)
> res.HS1 <- HS.normal.means(data, method.tau = "fixed", tau = tau.hat,
+ method.sigma = "fixed", Sigma2 = 1)
[1] 1000
[1] 2000
[1] 3000
[1] 4000
[1] 5000
[1] 6000
> #Plot the posterior mean against the data (signals in blue)
> plot(data, res.HS1$BetaHat, col = c(rep("black", 80), rep("blue", 20)))
> #Find the selected betas (ideally, the last 20 are equal to 1)
> HS.var.select(res.HS1, data, method = "intervals")
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0
[75] 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> #Plot the credible intervals
> library(Hmisc)
Attaching package: ‘Hmisc’
The following objects are masked from ‘package:base’:
format.pval, units
> xYplot(Cbind(res.HS1$BetaHat, res.HS1$LeftCI, res.HS1$RightCI) ~ 1:100)
Error in sRequire("lattice") :
package lattice is required but not installed
Calls: xYplot -> sRequire
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Version: 0.2.0
Check: examples
Result: ERROR
Running examples in ‘horseshoe-Ex.R’ failed
The error most likely occurred in:
> ### Name: HS.normal.means
> ### Title: The horseshoe prior for the sparse normal means problem
> ### Aliases: HS.normal.means
>
> ### ** Examples
>
> #Empirical Bayes example with 20 signals, rest is noise
> #Posterior mean for the signals is plotted
> #And variable selection is performed using the credible intervals
> #And the credible intervals are plotted
> truth <- c(rep(0, 80), rep(8, 20))
> data <- truth + rnorm(100, 1)
> tau.hat <- HS.MMLE(data, Sigma2 = 1)
> res.HS1 <- HS.normal.means(data, method.tau = "fixed", tau = tau.hat,
+ method.sigma = "fixed", Sigma2 = 1)
[1] 1000
[1] 2000
[1] 3000
[1] 4000
[1] 5000
[1] 6000
> #Plot the posterior mean against the data (signals in blue)
> plot(data, res.HS1$BetaHat, col = c(rep("black", 80), rep("blue", 20)))
> #Find the selected betas (ideally, the last 20 are equal to 1)
> HS.var.select(res.HS1, data, method = "intervals")
[1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
[38] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0
[75] 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
> #Plot the credible intervals
> library(Hmisc)
Attaching package: ‘Hmisc’
The following objects are masked from ‘package:base’:
format.pval, units
> xYplot(Cbind(res.HS1$BetaHat, res.HS1$LeftCI, res.HS1$RightCI) ~ 1:100)
Error in sRequire("lattice") :
package lattice is required but not installed
Calls: xYplot -> sRequire
Execution halted
Flavor: r-devel-linux-x86_64-fedora-clang