Open davidrjohnson4 opened 3 years ago
Could you please provide a reproducible example that throws that error? I am not getting an error with this code from the vignette:
library(bkmr) set.seed(111) dat <- SimData(n = 50, M = 4) y <- dat$y Z <- dat$Z X <- dat$X
priorfits <- InvestigatePrior(y = y, Z = Z, X = X, q.seq = c(2, 1/2, 1/4, 1/16)) PlotPriorFits(y = y, Z = Z, X = X, fits = priorfits)
X_intercept <- matrix(1, length(y), 1) priorfits2 <- InvestigatePrior(y = y, Z = Z, X = X_intercept, q.seq = c(2, 1/2, 1/4, 1/16)) PlotPriorFits(y = y, Z = Z, X = X_intercept, fits = priorfits2)
In the InvestigatePriors() function, it looks like the default for X used to be X = NULL, but now the function requires a specified X (the matrix of covariate data). I can't get it to work, with or without an X, and it throws different errors when I put X = NULL (' Error in model.frame.default(formula = ~U + y + X + group, data =, : invalid type (NULL) for variable 'X' '), or dummy X covariate data (' Error in X %*% fief(fit) : non-conformable arguments '). Any ideas what might be happening, or fixes/workarounds?
Thanks!