R Under development (unstable) (2023-12-04 r85659 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(bfp) > > set.seed (234) > > ## setting where the error occured > beta0 <- 1 > alpha1 <- 1 > alpha2 <- c (1, 1) > delta1 <- 1 > > sampleSize <- c (40, 100) > sigma2 <- c (4, 3, 2, 1) > hyperpara <- c (3.05, 3.4, 3.7, 3.95) > > h <- 1 > i <- 4 > j <- 4 > > thisN <- sampleSize[h] > > x <- matrix (runif (thisN * 3, 1, 4), nrow = thisN, ncol = 3) # predictor values > w <- matrix (rbinom (thisN * 2, size = 1, prob = 0.5), nrow = thisN, ncol = 2) > > covData <- data.frame (x = x, w = w)# start data frame > > x1tr <- alpha1 * x[,1]^2 > x2tr <- cbind (x[,2]^-0.5, x[,2]^-0.5 * log (x[,2])) %*% alpha2 > w1tr <- delta1 * w[,1] > > predictorTerms <- x1tr + x2tr + w1tr # linear predictor > > thisPriorSpecs <- list(a = hyperpara[i], + modelPrior="sparse") > > covData$y <- predictorTerms + rnorm (thisN, 0, sqrt (sigma2[j])) > > ## try it: > modelNow <- BayesMfp (y ~ bfp (x.1) + bfp (x.2) + bfp (x.3) + uc (w.1) + uc (w.2), + data = covData, + priorSpecs = thisPriorSpecs, + method = "exhaustive" + ) Starting with computation of every model... 0%______________________________________________________________________________________________100% ---------------------------------------------------------------------------------------------------- Actual number of possible models: 364500 Number of non-identifiable models: 0 Number of saved possible models: 3645 > > proc.time() user system elapsed 11.89 0.20 12.07