I have gene expression for > 1000 genes and a few important clinical predictors, e.g. age and gender. I would like to be able to specify a regularizing horseshoe prior on all of the genes, but a weakly regularizing prior on the clinical predictors (e.g. normal(0, 1)). However, this doesn’t seem to be possible. Is this something that can be made possible in a future release or are there issues with doing this?
Thanks!
See below for a simulated example.
set.seed(123)
#Simulated gene expression
genes <- data.frame(expression=rnorm(100*1000, mean=10, sd=2),
geneID=rep(paste0("Gene", 1:1000), each=100),
subjectID=rep(paste0("Subject", 1:100), 1000)) %>%
spread(key=geneID, value=expression) %>%
select(-subjectID)
#Simulate outcome, age, gender and then bind with gene expression
sim_data <- data.frame(y=rnorm(100), age=rnorm(100, 50, 5), gender=rbernoulli(100)*1) %>%
bind_cols(., genes)
#Model with different priors on genes, age, gender
fit_simulated <- brm(y ~ .,
prior=c(set_prior("normal(0, 1)", coef="age"),
set_prior("normal(0, 1)", coef="gender"),
set_prior("horseshoe(1)", class="b")),
data=sim_data)
This results in the following error:
Error: Defining priors for single population-level parameters is not allowed when using horseshoe or lasso priors (except for the Intercept).
Please also provide the following information in addition to your question:
- Operating System: macOS High Sierra 10.13.1
- brms Version: 2.8.0