Dear R help,
What am I doing wrong here? when I don't specify the priors it works
just fine but when I specify the priors it breaks.? Does anyone know
why and how I can fix it?
----
N=20000
ncontrol=ncases=50
X <- as.matrix(rnorm(N,0,1))
eta <- -5.3 + X * 1.7
p <- exp(eta)/(1+exp(eta))
Y <- rbinom(N,1,p)
controls <- sample(seq_len(N), ncontrol, prob=!Y)
cases <- sample(seq_len(N), ncases, prob=Y)
data<-rbind(
+ data.frame(Y = 0, X = cbind(1,X[controls,])),
+ data.frame(Y = 1, X = cbind(1,X[cases,])))