You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use cbc_choices() with a design where no_choice = TRUE, the choices get simulated, but the model always has NA for the standard errors. There may need to be a special argument for handling the no_choice variable, similar to the prior_no_choice argument in cbc_design(). Here is an example:
# Load libraries
library(cbcTools)
library(logitr)
# Define profiles with attributes and levelsprofiles<- cbc_profiles(
price= c(15, 20, 25), # Price ($1,000)fuelEconomy= c(20, 25, 30), # Fuel economy (mpg)accelTime= c(6, 7, 8), # 0-60 mph acceleration time (s)powertrain= c("Gasoline", "Electric")
)
# Make a full-factorial design of experimentdesign<- cbc_design(
profiles=profiles,
n_resp=1000, # Number of respondentsn_alts=3, # Number of alternatives per questionn_q=8, # Number of questions per respondentno_choice=TRUE
)
# Simulate choices according to an assumed utility modeldata<- cbc_choices(
design=design,
obsID="obsID",
priors=list(
price=-0.7,
fuelEconomy=0.1,
accelTime=-0.2,
powertrain_Electric=-4.0,
no_choice=-2
)
)
# Estimate a model model<- logitr(
data=data,
outcome="choice",
obsID="obsID",
pars= c(
"price", "fuelEconomy", "accelTime", "powertrain_Electric", "no_choice"
)
)
summary(model)
The text was updated successfully, but these errors were encountered:
When I use
cbc_choices()
with a design whereno_choice = TRUE
, the choices get simulated, but the model always hasNA
for the standard errors. There may need to be a special argument for handling theno_choice
variable, similar to theprior_no_choice
argument incbc_design()
. Here is an example:The text was updated successfully, but these errors were encountered: