# NOT RUN {
#generate outcomes on a grid using example coefficient values and design matrix
set.seed(42)
#for a multinomial response, beta and eta will have more than one column
#for a binary response, beta and eta will only have one column
#here, we the response variable takes 3 possible values, so beta and eta have two columns
beta=cbind(c(0,1.25,-1,2,-0.8),c(-3,0.25,-5,1,-0.4))
#setting the eta coefficients
eta=cbind(c(0.6,0),c(0,0.6))
#these are the final coefficient values we'll use to generate the data
theta=rbind(beta,eta)
#X matrix with 5 predictors and 900 observations for a 10x10 grid
X=cbind(rep(1,900),replicate(4,rnorm(900)))
#generate data for 30x30 grid
z=simulateData(theta,X,30,30,centered=TRUE,k=3,burn=1)
# }
Run the code above in your browser using DataLab