Important: Read this before posting to this forum

  1. This forum is for questions related to the use of Apollo. We will answer some general choice modelling questions too, where appropriate, and time permitting. We cannot answer questions about how to estimate choice models with other software packages.
  2. There is a very detailed manual for Apollo available at http://www.ApolloChoiceModelling.com/manual.html. This contains detailed descriptions of the various Apollo functions, and numerous examples are available at http://www.ApolloChoiceModelling.com/examples.html. In addition, help files are available for all functions, using e.g. ?apollo_mnl
  3. Before asking a question on the forum, users are kindly requested to follow these steps:
    1. Check that the same issue has not already been addressed in the forum - there is a search tool.
    2. Ensure that the correct syntax has been used. For any function, detailed instructions are available directly in Apollo, e.g. by using ?apollo_mnl for apollo_mnl
    3. Check the frequently asked questions section on the Apollo website, which discusses some common issues/failures. Please see http://www.apollochoicemodelling.com/faq.html
    4. Make sure that R is using the latest official release of Apollo.
  4. If the above steps do not resolve the issue, then users should follow these steps when posting a question:
    1. provide full details on the issue, including the entire code and output, including any error messages
    2. posts will not immediately appear on the forum, but will be checked by a moderator first. This may take a day or two at busy times. There is no need to submit the post multiple times.

Unlabelled DCE with fixed status quo

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
Post Reply
JuliavB
Posts: 41
Joined: 18 Aug 2021, 13:36

Unlabelled DCE with fixed status quo

Post by JuliavB »

Hello,
I have conducted a pretest for my DCE.
The DCE has one fixed status quo (which is the same in all choice sets) plus two alternatives per choice set, each respondent answering nine choice tasks each.
The first attribute (Beitr) is a linear variable with the following levels [1.6; 1.8; 3.3; 4.8] where level “1.6” only is used for fixed status quo. The other three levels are used in the alternatives only.
The second (HoeheEEE) and third attribute (ZeitEEE) are categorical variables with the following levels:
HoeheEEE [unlimited, 300, 600, 900]
ZeitEEE [unlimited, 12 ,36 ,72]
The level “unlimited” is used in fixed status quo as well as the alternatives.
I am now especially wondering on
- if I defined right the dummy variables for attr2 and attr3
- how to define “apollo_beta”
- how to define the “list of MNL utilities” especially with regard to V[["SQ"]] because I will not be able to estimate HoeheEEE1 and ZeitEEE1 as they are fixed for status quo?!
Please see below my code so far:

# ################################################################# #
#### LOAD DATA AND APPLY ANY TRANSFORMATIONS ####
# ################################################################# #
Daten_Choice_Pivot <- read.csv("DatenApollo.csv", header = TRUE)
## Defining levels of Attribute 1
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==1)] <- 1.6
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==2)] <- 1.8
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==3)] <- 3.3
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==4)] <- 4.8

Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==1)] <- 1.6
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==2)] <- 1.8
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==3)] <- 3.3
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==4)] <- 4.8

Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==1)] <- 1.6
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==2)] <- 1.8
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==3)] <- 3.3
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==4)] <- 4.8
## Defining Attribute 2 as dummy variable
Daten_Choice_Pivot$HoeheEEE_2_1 <- ifelse(Daten_Choice_Pivot$HoeheEEE_2==1,1,0)
Daten_Choice_Pivot$HoeheEEE_2_2 <- ifelse(Daten_Choice_Pivot$HoeheEEE_2==2,1,0)
Daten_Choice_Pivot$HoeheEEE_2_3 <- ifelse(Daten_Choice_Pivot$HoeheEEE_2==3,1,0)

Daten_Choice_Pivot$HoeheEEE_3_1 <- ifelse(Daten_Choice_Pivot$HoeheEEE_3==1,1,0)
Daten_Choice_Pivot$HoeheEEE_3_2 <- ifelse(Daten_Choice_Pivot$HoeheEEE_3==2,1,0)
Daten_Choice_Pivot$HoeheEEE_3_3 <- ifelse(Daten_Choice_Pivot$HoeheEEE_3==3,1,0)

## Defining Attribute 3 as dummy variable
Daten_Choice_Pivot$ZeitEEE_2_1 <- ifelse(Daten_Choice_Pivot$ZeitEEE_2==1,1,0)
Daten_Choice_Pivot$ZeitEEE_2_2 <- ifelse(Daten_Choice_Pivot$ZeitEEE_2==2,1,0)
Daten_Choice_Pivot$ZeitEEE_2_3 <- ifelse(Daten_Choice_Pivot$ZeitEEE_2==3,1,0)

Daten_Choice_Pivot$ZeitEEE_3_1 <- ifelse(Daten_Choice_Pivot$ZeitEEE_3==1,1,0)
Daten_Choice_Pivot$ZeitEEE_3_2 <- ifelse(Daten_Choice_Pivot$ZeitEEE_3==2,1,0)
Daten_Choice_Pivot$ZeitEEE_3_3 <- ifelse(Daten_Choice_Pivot$ZeitEEE_3==3,1,0)

database = Daten_Choice_Pivot
# ################################################################# #
#### DEFINE MODEL PARAMETERS ####
# ################################################################# #
### Vector of parameters, including any kept fixed during estimation
apollo_beta = c(Beitr = 0,
HoeheEEE_2_1 = 0, HoeheEEE_2_2 = 0, HoeheEEE_2_3 = 0, HoeheEEE_3_1 = 0, HoeheEEE_3_2 = 0, HoeheEEE_3_3 = 0,
ZeitEEE_2_1 = 0, ZeitEEE_2_2 = 0, ZeitEEE_2_3 = 0, ZeitEEE_3_1 = 0, ZeitEEE_3_2 = 0, ZeitEEE_3_3 = 0)
### Vector with parameter names (in quotes) to be kept fixed at
# their starting values during estimation.
apollo_fixed = c()
# ################################################################# #
#### GROUP AND VALIDATE INPUTS ####
# ################################################################# #
apollo_inputs = apollo_validateInputs()
# ################################################################# #
#### DEFINE MODEL AND LIKELIHOOD FUNCTION ####
# ################################################################# #
apollo_probabilities=function(apollo_beta, apollo_inputs,
functionality="estimate"){
### Function initialisation: do not change the following three commands
### Attach and detach inputs, and create empty list of probabilities
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))
P = list()
### List of MNL utilities: must use the same names as in mnl_settings
V = list()
V[["SQ"]] = Beitr*Beitr_1 + HoeheEEE*HoeheEEE_1 + ZeitEEE*ZeitEEE_1
V[["RefA"]] = Beitr*Beitr_2 + HoeheEEE*HoeheEEE_2 + ZeitEEE*ZeitEEE_2
V[["RefB"]] = Beitr*Beitr_3 + HoeheEEE*HoeheEEE_3 + ZeitEEE*ZeitEEE_3
### Define settings for MNL model component
mnl_settings = list(
alternatives = c(SQ=1, RefA=2, RefB=3),
choiceVar = Choice,
utilities = V
)
### Compute probabilities using MNL model
P[["model"]] = apollo_mnl(mnl_settings, functionality)
### Comment out as necessary
P = apollo_panelProd(P, apollo_inputs, functionality)
P = apollo_prepareProb(P, apollo_inputs, functionality)
return(P)
}
# ################################################################# #
#### MODEL ESTIMATION AND OUTPUT ####
# ################################################################# #
model = apollo_estimate(apollo_beta, apollo_fixed,
apollo_probabilities, apollo_inputs)
apollo_modelOutput(model)
apollo_saveOutput(model)

Any help is highly appreciated!
Thank you very much in advance.
Best regards,
J.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Unlabelled DCE with fixed status quo

Post by stephanehess »

Julia

your model should be identified as for the categorical variables, the level used for the SQ can also be used for the non-SQ

But there are some isuses in the code. Your parameters should be the same across the alternatives, with a normalisation of keeping the parameter for one level fixed for each categorical variable. In the utilites, you need to then expliclity write the multiplication between each parameter and the corresponding level of the dummy coded attribute. The MNL examples on the website should be helpful for this (the service quality attribute is dummy coded)

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
JuliavB
Posts: 41
Joined: 18 Aug 2021, 13:36

Re: Unlabelled DCE with fixed status quo

Post by JuliavB »

Dear Prof. Hess,

thank you very much for your hints!
I´ve now adjusted my code.
Unfortunately, I am receiving the following error message:

# ################################################################# #
> #### MODEL ESTIMATION AND OUTPUT ####
> # ################################################################# #
> model = apollo_estimate(apollo_beta, apollo_fixed,
+ apollo_probabilities, apollo_inputs)
Preparing user-defined functions.
Error in apollo_probabilities(apollo_beta_shifted, apollo_inputs) :
object 'ZeitEEE' not found

___________
This is my new code:

# ################################################################# #
#### LOAD DATA AND APPLY ANY TRANSFORMATIONS ####
# ################################################################# #
Daten_Choice_Pivot <- read.csv("DatenApollo.csv", header = TRUE)

Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==1)] <- 1.6
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==2)] <- 1.8
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==3)] <- 3.3
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==4)] <- 4.8

Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==1)] <- 1.6
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==2)] <- 1.8
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==3)] <- 3.3
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==4)] <- 4.8

Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==1)] <- 1.6
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==2)] <- 1.8
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==3)] <- 3.3
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==4)] <- 4.8

database = Daten_Choice_Pivot
# ################################################################# #
#### DEFINE MODEL PARAMETERS ####
# ################################################################# #
### Vector of parameters, including any kept fixed during estimation
apollo_beta = c(b_Beitr = 0,
b_HoeheEEE300 = 0,
b_HoeheEEE600 = 0,
b_HoeheEEE900 = 0,
b_HoeheEEEunb = 0,
b_ZeitEEE12= 0,
b_ZeitEEE42 = 0,
b_ZeitEEE72 = 0,
b_ZeitEEEunb = 0)
### Vector with parameter names (in quotes) to be kept fixed at
# their starting values during estimation.
# Use apollo_beta_fixed = c() if none
apollo_fixed = c("b_HoeheEEEunb", "b_ZeitEEEunb")
# ################################################################# #
#### GROUP AND VALIDATE INPUTS ####
# ################################################################# #
apollo_inputs = apollo_validateInputs()
# ################################################################# #
#### DEFINE MODEL AND LIKELIHOOD FUNCTION ####
# ################################################################# #
apollo_probabilities=function(apollo_beta, apollo_inputs,
functionality="estimate"){

### Function initialisation: do not change the following three commands
### Attach and detach inputs, and create empty list of probabilities
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))
P = list()

### List of MNL utilities: must use the same names as in mnl_settings
V = list()

V[["SQ"]] = b_Beitr*Beitr_1 + b_HoeheEEE300*(HoeheEEE_1==1) + b_HoeheEEE600*(HoeheEEE_1==2) +
b_HoeheEEE900*(HoeheEEE_1==3)+ b_HoeheEEEunb*(HoeheEEE_1==4) + b_ZeitEEE12*(ZeitEEE_1==1) +
b_ZeitEEE42*(ZeitEEE_1==2) + b_ZeitEEE72*(ZeitEEE_1==3) + b_ZeitEEEunb*(ZeitEEE_1==4)
V[["RefA"]] = b_Beitr*Beitr_2 + b_HoeheEEE300*(HoeheEEE_2==1) + b_HoeheEEE600*(HoeheEEE_2==2) +
b_HoeheEEE900*(HoeheEEE_2==3)+ b_HoeheEEEunb*(HoeheEEE_2==4) + b_ZeitEEE12*(ZeitEEE==2) +
b_ZeitEEE42*(ZeitEEE_2==2) + b_ZeitEEE72*(ZeitEEE_2==3) + b_ZeitEEEunb*(ZeitEEE_2==4)
V[["RefB"]] = b_Beitr*Beitr_3 + b_HoeheEEE300*(HoeheEEE_3==1) + b_HoeheEEE600*(HoeheEEE_3==2) +
b_HoeheEEE900*(HoeheEEE_3==3)+ b_HoeheEEEunb*(HoeheEEE_3==4) + b_ZeitEEE12*(ZeitEEE_3==1) +
b_ZeitEEE42*(ZeitEEE_3==2) + b_ZeitEEE72*(ZeitEEE_3==3) + b_ZeitEEEunb*(ZeitEEE_3==4)

### Define settings for MNL model component
mnl_settings = list(
alternatives = c(SQ=1, RefA=2, RefB=3),
choiceVar = Choice,
utilities = V
)

### Compute probabilities using MNL model
P[["model"]] = apollo_mnl(mnl_settings, functionality)

### Comment out as necessary
P = apollo_panelProd(P, apollo_inputs, functionality)
P = apollo_prepareProb(P, apollo_inputs, functionality)
return(P)
}
# ################################################################# #
#### MODEL ESTIMATION AND OUTPUT ####
# ################################################################# #
model = apollo_estimate(apollo_beta, apollo_fixed,
apollo_probabilities, apollo_inputs)
apollo_modelOutput(model)
apollo_saveOutput(model)
___________

Couuld you provide any insights why this error occurs?

Thank you very much.
Best regards,
J.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Unlabelled DCE with fixed status quo

Post by stephanehess »

Hi

Apollo is telling you what's wrong :-)

It can't find ZeitEEE

And it looks like you have a subscript missing in (ZeitEEE==2)

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
JuliavB
Posts: 41
Joined: 18 Aug 2021, 13:36

Re: Unlabelled DCE with fixed status quo

Post by JuliavB »

Hi Stephane,
okay that was just a stupid mistake on my side...Thanks for spotting it. Now I am able to estimate the model with this code:

# ################################################################# #
#### LOAD DATA AND APPLY ANY TRANSFORMATIONS ####
# ################################################################# #
Daten_Choice_Pivot <- read.csv("DatenApollo.csv", header = TRUE)

Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==1)] <- 1.6
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==2)] <- 1.8
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==3)] <- 3.3
Daten_Choice_Pivot$Beitr_1[which(Daten_Choice_Pivot$Beitr_1==4)] <- 4.8

Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==1)] <- 1.6
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==2)] <- 1.8
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==3)] <- 3.3
Daten_Choice_Pivot$Beitr_2[which(Daten_Choice_Pivot$Beitr_2==4)] <- 4.8

Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==1)] <- 1.6
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==2)] <- 1.8
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==3)] <- 3.3
Daten_Choice_Pivot$Beitr_3[which(Daten_Choice_Pivot$Beitr_3==4)] <- 4.8

database = Daten_Choice_Pivot
# ################################################################# #
#### DEFINE MODEL PARAMETERS ####
# ################################################################# #
### Vector of parameters, including any kept fixed during estimation
apollo_beta = c(b0 = 0, b_Beitr = 0,
b_HoeheEEE300 = 0,
b_HoeheEEE600 = 0,
b_HoeheEEE900 = 0,
b_HoeheEEEunb = 0,
b_ZeitEEE12 = 0,
b_ZeitEEE42 = 0,
b_ZeitEEE72 = 0,
b_ZeitEEEunb = 0)
### Vector with parameter names (in quotes) to be kept fixed at
# their starting values during estimation.
# Use apollo_beta_fixed = c() if none
apollo_fixed = c("b_HoeheEEEunb", "b_ZeitEEEunb")
# ################################################################# #
#### GROUP AND VALIDATE INPUTS ####
# ################################################################# #
apollo_inputs = apollo_validateInputs()
# ################################################################# #
#### DEFINE MODEL AND LIKELIHOOD FUNCTION ####
# ################################################################# #
apollo_probabilities=function(apollo_beta, apollo_inputs,
functionality="estimate"){

### Function initialisation: do not change the following three commands
### Attach and detach inputs, and create empty list of probabilities
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))
P = list()

### List of MNL utilities: must use the same names as in mnl_settings
V = list()

V[["SQ"]] = b0 + b_Beitr*Beitr_1 + b_HoeheEEE300*(HoeheEEE_1==1) + b_HoeheEEE600*(HoeheEEE_1==2) +
b_HoeheEEE900*(HoeheEEE_1==3)+ b_HoeheEEEunb*(HoeheEEE_1==4) + b_ZeitEEE12*(ZeitEEE_1==1) +
b_ZeitEEE42*(ZeitEEE_1==2) + b_ZeitEEE72*(ZeitEEE_1==3) + b_ZeitEEEunb*(ZeitEEE_1==4)
V[["RefA"]] = b_Beitr*Beitr_2 + b_HoeheEEE300*(HoeheEEE_2==1) + b_HoeheEEE600*(HoeheEEE_2==2) +
b_HoeheEEE900*(HoeheEEE_2==3)+ b_HoeheEEEunb*(HoeheEEE_2==4) + b_ZeitEEE12*(ZeitEEE_2==1) +
b_ZeitEEE42*(ZeitEEE_2==2) + b_ZeitEEE72*(ZeitEEE_2==3) + b_ZeitEEEunb*(ZeitEEE_2==4)
V[["RefB"]] = b_Beitr*Beitr_3 + b_HoeheEEE300*(HoeheEEE_3==1) + b_HoeheEEE600*(HoeheEEE_3==2) +
b_HoeheEEE900*(HoeheEEE_3==3)+ b_HoeheEEEunb*(HoeheEEE_3==4) + b_ZeitEEE12*(ZeitEEE_3==1) +
b_ZeitEEE42*(ZeitEEE_3==2) + b_ZeitEEE72*(ZeitEEE_3==3) + b_ZeitEEEunb*(ZeitEEE_3==4)

### Define settings for MNL model component
mnl_settings = list(
alternatives = c(SQ=1, RefA=2, RefB=3),
choiceVar = Choice,
utilities = V
)

### Compute probabilities using MNL model
P[["model"]] = apollo_mnl(mnl_settings, functionality)

### Comment out as necessary
P = apollo_panelProd(P, apollo_inputs, functionality)
P = apollo_prepareProb(P, apollo_inputs, functionality)
return(P)
}

modelOutput_Liste = list(printChange=TRUE, printClassical=TRUE, printCorr=TRUE,
printCovar=TRUE, printDataReport=TRUE, printFixed=TRUE,
printFunctions=TRUE, printModelStructure=TRUE,
printOutliers=TRUE, printPVal=2, printT1=TRUE)

# ################################################################# #
#### MODEL ESTIMATION AND OUTPUT ####
# ################################################################# #
model = apollo_estimate(apollo_beta, apollo_fixed,
apollo_probabilities, apollo_inputs)
Output_MNL <- apollo_modelOutput(model, modelOutput_settings = modelOutput_Liste)
apollo_saveOutput(model)
_______________________________

I have just two more questions on the outputs:
1. I´ve added a constant b0 to my status quo utility in order to find out if there is a general preference for status quo which is not explained by the components of the model. Can this parameter be interpreted further with respect to its size? I have only 10% of choices being fixed status quo but b0 = -0.96 which seems to be quite high in opposition to that.
2. In the output of the console there are p-values for rob.t.rat. (0) and rob.t.rat.(1) [see below]. I was wondering what is the difference between rob.t.rat.(0) and rob.t.rat.(1) and why the p-values of rob.t.rat.(0) are lower (better) than for rob.t.rat.(1)?
Furthermore, is there a reason why only rob.t.rat.(0) and t.rat (0) are written in the output file (txt. file) but not rob.t.rat.(1) and t.rat (1)?
___________________________________________
Estimates:
Estimate s.e. t.rat.(0) p(2-sided) t.rat(1) p(2-sided) Rob.s.e. Rob.t.rat.(0)
b0 -0.9618 0.27136 -3.544 3.9363e-04 -7.2295 4.847e-13 0.36603 -2.628
b_Beitr -0.4862 0.06517 -7.461 8.593e-14 -22.8055 0.00000 0.09350 -5.200
b_HoeheEEE300 1.4049 0.24076 5.835 5.369e-09 1.6819 0.09259 0.26726 5.257
b_HoeheEEE600 1.0240 0.22773 4.497 6.901e-06 0.1056 0.91590 0.24717 4.143
b_HoeheEEE900 0.4527 0.21780 2.078 0.037666 -2.5129 0.01197 0.24061 1.881
b_HoeheEEEunb 0.0000 NA NA NA NA NA NA NA
b_ZeitEEE12 1.0609 0.22763 4.661 3.150e-06 0.2676 0.78898 0.26771 3.963
b_ZeitEEE42 0.5951 0.22096 2.693 0.007080 -1.8327 0.06685 0.26256 2.266
b_ZeitEEE72 0.2733 0.21977 1.244 0.213581 -3.3064 9.4502e-04 0.26412 1.035
b_ZeitEEEunb 0.0000 NA NA NA NA NA NA NA
p(2-sided) Rob.t.rat.(1) p(2-sided)
b0 0.008598 -5.35968 8.337e-08
b_Beitr 1.992e-07 -15.89517 0.000000
b_HoeheEEE300 1.466e-07 1.51513 0.129739
b_HoeheEEE600 3.427e-05 0.09729 0.922495
b_HoeheEEE900 0.059913 -2.27471 0.022923
b_HoeheEEEunb NA NA NA
b_ZeitEEE12 7.401e-05 0.22757 0.819980
b_ZeitEEE42 0.023431 -1.54229 0.123003
b_ZeitEEE72 0.300707 -2.75118 0.005938
b_ZeitEEEunb NA NA NA
______________________
Any advice is highly appreciated.
Thank you and best,
J.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Unlabelled DCE with fixed status quo

Post by stephanehess »

Hi
1. I´ve added a constant b0 to my status quo utility in order to find out if there is a general preference for status quo which is not explained by the components of the model. Can this parameter be interpreted further with respect to its size? I have only 10% of choices being fixed status quo but b0 = -0.96 which seems to be quite high in opposition to that.
What you could do is make two predictions from the model. One where the parameter for SQ is 0, and one where it is at your estimate (all other parameters should be at the estimates in both runs). Then see how the probabilities differ.
2. In the output of the console there are p-values for rob.t.rat. (0) and rob.t.rat.(1) [see below]. I was wondering what is the difference between rob.t.rat.(0) and rob.t.rat.(1) and why the p-values of rob.t.rat.(0) are lower (better) than for rob.t.rat.(1)?
Furthermore, is there a reason why only rob.t.rat.(0) and t.rat (0) are written in the output file (txt. file) but not rob.t.rat.(1) and t.rat (1)?
One is against a value of 1, the other against 0. You will most likely want the one against 0. The one against 1 is useful for multipliers, nesting parameters, etc. Regarding what is shown on the screen and in the files, this depends on your settings passed to the functions - see also the help files and manual.

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
JuliavB
Posts: 41
Joined: 18 Aug 2021, 13:36

Re: Unlabelled DCE with fixed status quo

Post by JuliavB »

Dear Stephane,

thank you very much for your reply!

"What you could do is make two predictions from the model. One where the parameter for SQ is 0, and one where it is at your estimate (all other parameters should be at the estimates in both runs). Then see how the probabilities differ."

For my estimates I have made the predictions with the following code (which is taking the estimates from my model for SQ and all the other parameters; the second prediction you´ve mentioned):

prediction_settings = list(nRep=100, runs=30, silent=FALSE, summary=TRUE)

forecast = apollo_prediction(model, apollo_probabilities, apollo_inputs,
prediction_settings)

Results:
Aggregated prediction
at MLE Sampled mean Sampled std.dev. Quantile 0.025 Quantile 0.975
SQ 40.0 40.88 8.018 26.58 55.17
RefA 146.3 145.89 5.626 136.52 157.35
RefB 191.7 191.23 7.223 178.38 202.97

Average prediction
at MLE Sampled mean Sampled std.dev. Quantile 0.025 Quantile 0.975
SQ 0.1058 0.1081 0.02121 0.07033 0.1460
RefA 0.3870 0.3859 0.01488 0.36117 0.4163
RefB 0.5071 0.5059 0.01911 0.47190 0.5370

The average prediction is the same as the the real decisions from DCE.
___________
Then I´ve taken out the b0 parameter from my V[["SQ"], estimated the model again and run the same prediction as above again. Is that what you´ve meant by setting the parameter for SQ to 0?

Results:
Aggregated prediction
at MLE Sampled mean Sampled std.dev. Quantile 0.025 Quantile 0.975
SQ 53.02 53.67 7.797 41.78 67.28
RefA 133.47 133.47 4.669 124.12 141.20
RefB 191.51 190.86 7.373 176.57 201.61

Average prediction
at MLE Sampled mean Sampled std.dev. Quantile 0.025 Quantile 0.975
SQ 0.1403 0.1420 0.02063 0.1105 0.1780
RefA 0.3531 0.3531 0.01235 0.3284 0.3735
RefB 0.5066 0.5049 0.01951 0.4671 0.5334

There seem to be slight differences for SQ and RefA, but I am not sure how to deal with that result exactly?!

Thank you very much and best wishes,
J.
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Unlabelled DCE with fixed status quo

Post by stephanehess »

So what this shows you is that the SQ constant captures a preference for the other options that in the case of your data reduces the baseline probability from 0.14 to 0.11
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply