I am new to R, and I am currently utilizing one for my project which require the use of labeled DCE. However I kept getting the message Error in ced[[i]] : subscript out of bounds every time I try to load the data matrix.
Does anyone know how to fix it?
This is the code: library(support.CEs)
library(survival)
library(mded)
d.menstrual <- Lma.design(
attribute.names = list(
Price = c("1","2","3"), Price2 = c("2","3","4"), Price3 = c("10","11","12")),
nalternatives = 1,
nblocks = 1,
row.renames = FALSE,
seed = 987)
d.menstrual
questionnaire(choice.experiment.design = d.menstrual)
dm.menstrual <- make.design.matrix(
choice.experiment.design = d.menstrual,
optout = TRUE,
continuous.attributes = c("Price","Price2", "Price3"),
unlabeled = FALSE)
dm.menstrual