I am programming in R
using hierarchical bayes for a choice-based conjoint task and wondering how I code the "none of the above" option in the design matrix?
The R
code that I am using is below, which contains the rhierMnlRwMixture()
function from the bayesm
package. The response options are from two product bundles plus a none of the above option (3 response options). Is it correct to use all 0's in the third row of the design matrix which relates to the none of the above option (example for respondent 1 first choice)?
R
code:
mcmc=list(R=20000,keep=10)
library(bayesm)
out=rhierMnlRwMixture(Data=list(p=3,lgtdata=lgtdata),Prior=list(ncomp=1),Mcmc=mcmc)
$y
[1] 2
$X
[,1] [,2] [,3] [,4] [,5]
[1,] 1 0 0 0 1
[2,] 0 0 1 0 0
[3,] 0 0 0 0 0