Running examples in 'SMME-Ex.R' failed
The error most likely occurred in:

> ### Name: SMME
> ### Title: Soft Maximin Estimation for Large Scale Heterogenous Data
> ### Aliases: SMME softmaximin pga
> ### Keywords: package
> 
> ### ** Examples
> 
> #Non-array data
> 
> ##size of example
> set.seed(42)
> G <- 10; n <- sample(100:500, G); p <- 60
> x <- y <- list()
> 
> ##group design matrices
> for(g in 1:G){x[[g]] <- matrix(rnorm(n[g] * p), n[g], p)}
> 
> ##common features and effects
> common_features <- rbinom(p, 1, 0.1) #sparsity of comm. feat.
> common_effects <- rnorm(p) * common_features
> 
> ##group response
> for(g in 1:G){
+ bg <- rnorm(p, 0, 0.5) * (1 - common_features) + common_effects
+ mu <- x[[g]] %*% bg
+ y[[g]] <- rnorm(n[g]) + mu
+ }
> 
> ##fit model for range of lambda and zeta
> system.time(fit <- softmaximin(x, y, zeta = c(0.1, 1), penalty = "lasso", alg = "npg"))
Warning in softmaximin(x, y, zeta = c(0.1, 1), penalty = "lasso", alg = "npg") :
  maximum number of backtraking steps reached for model no. 26 20  for zeta(s) 0.1 1
Multithreading was enabled using 4 threads
   user  system elapsed 
   0.39    1.03    0.84 
> betahat <- fit$coef
> 
> ##estimated common effects for specific lambda and zeta
> modelno <- 9; zetano <- 2
> m <- min(betahat[[zetano]][ , modelno], common_effects)
> M <- max(betahat[[zetano]][ , modelno], common_effects)
> plot(common_effects, type = "p", ylim = c(m, M), col = "red")
> lines(betahat[[zetano]][ , modelno], type = "h")
> 
> #Array data
> ##size of example
> set.seed(42)
> G <- 50; n <- c(30, 20, 10); p <- c(7, 5, 4)
> 
> ##marginal design matrices (Kronecker components)
> x <- list()
> for(i in 1:length(n)){x[[i]] <- matrix(rnorm(n[i] * p[i]), n[i], p[i])}
> 
> ##common features and effects
> common_features <- rbinom(prod(p), 1, 0.1) #sparsity of comm. feat.
> common_effects <- rnorm(prod(p),0,0.1) * common_features
> 
> ##group response
>  y <- array(NA, c(n, G))
> for(g in 1:G){
+ bg <- rnorm(prod(p), 0, .1) * (1 - common_features) + common_effects
+ Bg <- array(bg, p)
+ mu <- RH(x[[3]], RH(x[[2]], RH(x[[1]], Bg)))
+ y[,,, g] <- array(rnorm(prod(n)), dim = n) + mu
+ }
> 
> ##fit model for range of lambda and zeta
> system.time(fit <- softmaximin(x, y, zeta = c(1, 10, 100), penalty = "lasso",
+             alg = "npg"))
Warning in softmaximin(x, y, zeta = c(1, 10, 100), penalty = "lasso", alg = "npg") :
  maximum number of backtraking steps reached for model no. 24  for zeta(s) 1
Multithreading was enabled using 4 threads
   user  system elapsed 
   1.66    5.18    4.49 
> Betahat <- fit$coef
> 
> ##estimated common effects for specific lambda and zeta
> modelno <- 30; zetano <- 1
> m <- min(Betahat[[zetano]][, modelno], common_effects)
Error in Betahat[[zetano]][, modelno] : subscript out of bounds
Execution halted