I am using stan_lmer function from rstanarm packages. I am getting an error saying fixed-effect model matrix is rank deficient so dropping 1 column / coefficient.
Since I am passing the informative priors in the function so due to dropped column in matrix, the size of priors gets differ.
I need help in identifying the dropped columns so that I can adjust the priors vector to make the code run.
Code I ma using is as following -
model <- stan_lmer(F1,data = x,
prior = normal(
location = c(mean(x$elasticity),rep(0,length(unique(x$ZONE_ID))-1),0,0,0.3,
rep(0,length(unique(x$Week_wrap))-1),
rep(0,length(unique(x$ZONE_ID))-1),0.3,0.3),
scale = c(lpv,rep(2.5,length(unique(x$ZONE_ID))-1),2.5,1,0.1,
rep(2.5,length(unique(x$Week_wrap))-1),
rep(1.5,length(unique(x$ZONE_ID))-1),0.2,0.2),
autoscale = FALSE),
seed = seed_num, algorithm = method_c,iter = num_iter,QR = TRUE)