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.

Possible model specification error for labelled design

Ask questions about model specifications. Ideally include a mathematical explanation of your proposed model.
kylep
Posts: 6
Joined: 08 Mar 2022, 14:48

Possible model specification error for labelled design

Post by kylep »

Hello Professors Hess and Palma,

Hope this finds you doing well. I am working on an analysis for a labelled discrete choice experiment, and I am brand new to this type of experiment and analysis. I have been using support.CEs package to set up my data and apollo for analysis. The study is trying to determine preferences between performing a healthcare service in-house or refer it out to a contractor based on several attributes (time, cost, patient benefit, etc.). We also divided the design into 3 blocks of 6 scenarios each which were randomly assigned to respondents. I am not sure what all you need to assist in troubleshooting, but I will provide as much as possible. After formatting the data using support.CEs, it looks like this:

ID BLOCK QES STR RES.1 ASC.1 X4.hours1.1 X8.hours1.1 X.10.caregiver1.1 X.20.caregiver1.1 X10..decrease1.1 X20..decrease1.1
1 1 1 1 101 FALSE 1 0 1 0 0 1 0
3 1 1 2 102 TRUE 1 1 0 0 1 0 0
5 1 1 3 103 FALSE 1 0 1 1 0 0 0
7 1 1 4 104 FALSE 1 0 0 0 1 0 1
9 1 1 5 105 TRUE 1 1 0 0 0 0 1
11 1 1 6 106 TRUE 1 0 1 0 1 0 1
X5..lower1.1 X10..lower1.1 X5..increase1.1 X10..increase1.1 X4.hours2.1 X8.hours2.1 X.10.caregiver2.1 X.20.caregiver2.1
1 0 1 0 0 0 0 0 0
3 1 0 0 1 0 0 0 0
5 1 0 0 0 0 0 0 0
7 1 0 0 0 0 0 0 0
9 0 0 0 1 0 0 0 0
11 0 1 0 1 0 0 0 0
X10..decrease2.1 X20..decrease2.1 X5..lower2.1 X10..lower2.1 X5..increase2.1 X10..increase2.1 RES.2 ASC.2 X4.hours1.2
1 0 0 0 0 0 0 TRUE 0 0
3 0 0 0 0 0 0 FALSE 0 0
5 0 0 0 0 0 0 TRUE 0 0
7 0 0 0 0 0 0 TRUE 0 0
9 0 0 0 0 0 0 FALSE 0 0
11 0 0 0 0 0 0 FALSE 0 0
X8.hours1.2 X.10.caregiver1.2 X.20.caregiver1.2 X10..decrease1.2 X20..decrease1.2 X5..lower1.2 X10..lower1.2 X5..increase1.2
1 0 0 0 0 0 0 0 0
3 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0
9 0 0 0 0 0 0 0 0
11 0 0 0 0 0 0 0 0
X10..increase1.2 X4.hours2.2 X8.hours2.2 X.10.caregiver2.2 X.20.caregiver2.2 X10..decrease2.2 X20..decrease2.2 X5..lower2.2
1 0 0 0 1 0 0 1 0
3 0 0 1 0 0 1 0 0
5 0 0 0 0 1 1 0 0
7 0 1 0 0 0 0 0 0
9 0 0 1 1 0 0 0 1
11 0 0 0 0 0 0 0 0
X10..lower2.2 X5..increase2.2 X10..increase2.2 choice
1 0 1 0 2
3 1 0 0 1
5 1 1 0 2
7 1 1 0 2
9 0 0 0 1
11 0 0 0 1

The following is my apollo code and output. I am brand new to apollo as well so forgive any errors:

apollo_initialise()
apollo_control <- list(
modelName = "CL_apollo",
modelDescr = "DCE for Facebook Support Groups",
indivID = "ID"
)
database <- DCE.data.full.r
apollo_beta <- c(
asc1 = 0,
asc2 = 0,
b_4hours1 = 0,
b_8hours1 = 0,
b_10cg1 = 0,
b_20cg1 = 0,
b_10dec1 = 0,
b_20dec1 = 0,
b_5low1 = 0,
b_10low1 = 0,
b_5inc1 = 0,
b_10inc1 = 0,
b_4hours2 = 0,
b_8hours2 = 0,
b_10cg2 = 0,
b_20cg2 = 0,
b_10dec2 = 0,
b_20dec2 = 0,
b_5low2 = 0,
b_10low2 = 0,
b_5inc2 = 0,
b_10inc2 = 0
)

apollo_fixed <- c()
apollo_inputs <- apollo_validateInputs()
## Several observations per individual detected based on the value of ID.
## Setting panelData in apollo_control set to TRUE.
## All checks on apollo_control completed.
## All checks on database completed.
apollo_probabilities <- function(apollo_beta, apollo_inputs, functionality = "estimate"){
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))

P <- list()

V <- list()
V[['alt1']] = asc1 + b_4hours1*X4.hours1.1 + b_8hours1*X8.hours1.1 +
b_10cg1*X.10.caregiver1.1 +
b_20cg1*X.20.caregiver1.1 + b_10dec1*X10..decrease1.1 + b_20dec1*X20..decrease1.1 +
b_5low1*X5..lower1.1 + b_10low1*X10..lower1.1 + b_5inc1*X5..increase1.1 +
b_10inc1*X10..increase1.1
V[['alt2']] = asc2 +
b_4hours2*X4.hours2.2 + b_8hours2*X8.hours2.2 +
b_10cg2*X.10.caregiver2.2 + b_20cg2*X.20.caregiver2.2 + b_10dec2*X10..decrease2.2 +
b_20dec2*X20..decrease2.2 + b_5low2*X5..lower2.2 + b_10low2*X10..lower2.2 +
b_5inc2*X5..increase2.2 + b_10inc2*X10..increase2.2

mnl_settings <- list(
alternatives = c(alt1 = 1, alt2 = 2),
avail = list(alt1 = 1, alt2 = 1),
choiceVar = choice,
V = V
)

P[['model']] <- apollo_mnl(mnl_settings, functionality)
P <- apollo_panelProd(P, apollo_inputs, functionality)
P <- apollo_prepareProb(P, apollo_inputs, functionality)

return(P)
}
model <- apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)
##
## Testing likelihood function...
##
## Overview of choices for MNL model component :
## alt1 alt2
## Times available 1038.00 1038.00
## Times chosen 434.00 604.00
## Percentage chosen overall 41.81 58.19
## Percentage chosen when available 41.81 58.19
##
## Pre-processing likelihood function...
##
## Testing influence of parameters......................
## Starting main estimation
## Initial function value: -719.4868
## Initial gradient value:
## asc1 asc2 b_4hours1 b_8hours1 b_10cg1 b_20cg1 b_10dec1 b_20dec1
## -85.0 85.0 -14.0 -44.5 -28.5 -39.5 -85.5 85.5
## b_5low1 b_10low1 b_5inc1 b_10inc1 b_4hours2 b_8hours2 b_10cg2 b_20cg2
## -27.5 -10.0 -30.0 -10.5 26.5 14.0 17.0 28.5
## b_10dec2 b_20dec2 b_5low2 b_10low2 b_5inc2 b_10inc2
## 85.0 85.5 47.5 27.5 44.5 30.0
## initial value 719.486773
## iter 2 value 676.151503
## iter 3 value 581.490273
## iter 4 value 575.289823
## iter 5 value 575.095376
## iter 6 value 574.851886
## iter 7 value 573.647232
## iter 8 value 573.303710
## iter 9 value 573.253082
## iter 10 value 572.958385
## iter 11 value 571.600535
## iter 12 value 571.530286
## iter 13 value 571.522960
## iter 14 value 571.435950
## iter 15 value 571.432525
## iter 16 value 571.428038
## iter 16 value 571.428037
## iter 16 value 571.428037
## final value 571.428037
## converged
## Additional convergence test using scaled estimation. Parameters will be
## scaled by their current estimates and additional iterations will be
## performed.
## initial value 571.428037
## iter 1 value 571.428037
## final value 571.428037
## converged
## Estimated parameters:
## Estimate
## asc1 -0.072715
## asc2 0.072715
## b_4hours1 0.119235
## b_8hours1 -0.244042
## b_10cg1 -0.002335
## b_20cg1 -0.231423
## b_10dec1 -0.453392
## b_20dec1 1.316599
## b_5low1 0.004069
## b_10low1 0.280412
## b_5inc1 -0.042371
## b_10inc1 0.235909
## b_4hours2 -0.052092
## b_8hours2 -0.119235
## b_10cg2 -0.161043
## b_20cg2 0.002335
## b_10dec2 0.935929
## b_20dec2 0.453392
## b_5low2 0.357196
## b_10low2 -0.004069
## b_5inc2 0.266253
## b_10inc2 0.042371
##
## Computing covariance matrix using analytical gradient.
## 0%....25%....50%....75%....100%
## WARNING: Some eigenvalues of the Hessian are complex, indicating that
## the Hessian is not symmetrical.
## Warning in sqrt(diag(varcov)): NaNs produced
## Computing score matrix...
## Warning in sqrt(diag(robvarcov)): NaNs produced
## Calculating LL(0) for applicable models...
## Calculating LL(c) for applicable models...
## Calculating LL of each model component...
apollo_modelOutput(model, list(printPVal = TRUE))
## Model run using Apollo for R, version 0.2.6 on Darwin
## www.ApolloChoiceModelling.com
##
## Model name : CL_apollo
## Model description : DCE for Facebook Support Groups
## Model run at : 2022-03-08 09:05:56
## Estimation method : bfgs
## Model diagnosis : successful convergence
## Number of individuals : 173
## Number of rows in database : 1038
## Number of modelled outcomes : 1038
##
## Number of cores used : 1
## Model without mixing
##
## LL(start) : -719.4868
## LL(0) : -719.4868
## LL(C) : -705.5029
## LL(final) : -571.428
## Rho-square (0) : 0.2058
## Adj.Rho-square (0) : 0.1752
## Rho-square (C) : 0.19
## Adj.Rho-square (C) : 0.1589
## AIC : 1186.86
## BIC : 1295.65
##
## Estimated parameters : 22
## Time taken (hh:mm:ss) : 00:00:1.75
## pre-estimation : 00:00:0.61
## estimation : 00:00:0.28
## post-estimation : 00:00:0.86
## Iterations : 20
##
## Unconstrained optimisation.
##
## Estimates:
## Estimate s.e. t.rat.(0) p(1-sided) Rob.s.e.
## asc1 -0.072715 NaN NaN NaN 150.385
## asc2 0.072715 2931. 2.481e-05 0.5000 20.213
## b_4hours1 0.119235 NaN NaN NaN NaN
## b_8hours1 -0.244042 NaN NaN NaN NaN
## b_10cg1 -0.002335 1589. -1.469e-06 0.5000 178.938
## b_20cg1 -0.231423 1845. -1.2546e-04 0.4999 8.663
## b_10dec1 -0.453392 NaN NaN NaN 242.463
## b_20dec1 1.316599 NaN NaN NaN 26.777
## b_5low1 0.004069 NaN NaN NaN 54.160
## b_10low1 0.280412 NaN NaN NaN 103.734
## b_5inc1 -0.042371 2.609e+04 -1.624e-06 0.5000 NaN
## b_10inc1 0.235909 7424. 3.178e-05 0.5000 42.686
## b_4hours2 -0.052092 NaN NaN NaN NaN
## b_8hours2 -0.119235 NaN NaN NaN NaN
## b_10cg2 -0.161043 1845. -8.730e-05 0.5000 NaN
## b_20cg2 0.002335 NaN NaN NaN 134.929
## b_10dec2 0.935929 NaN NaN NaN NaN
## b_20dec2 0.453392 NaN NaN NaN 280.243
## b_5low2 0.357196 NaN NaN NaN 100.963
## b_10low2 -0.004069 1513. -2.690e-06 0.5000 31.999
## b_5inc2 0.266253 7424. 3.586e-05 0.5000 54.739
## b_10inc2 0.042371 2.965e+04 1.429e-06 0.5000 NaN
## Rob.t.rat.(0) p(1-sided)
## asc1 -4.8352e-04 0.4998
## asc2 0.003598 0.4986
## b_4hours1 NaN NaN
## b_8hours1 NaN NaN
## b_10cg1 -1.305e-05 0.5000
## b_20cg1 -0.026715 0.4893
## b_10dec1 -0.001870 0.4993
## b_20dec1 0.049169 0.4804
## b_5low1 7.514e-05 0.5000
## b_10low1 0.002703 0.4989
## b_5inc1 NaN NaN
## b_10inc1 0.005527 0.4978
## b_4hours2 NaN NaN
## b_8hours2 NaN NaN
## b_10cg2 NaN NaN
## b_20cg2 1.730e-05 0.5000
## b_10dec2 NaN NaN
## b_20dec2 0.001618 0.4994
## b_5low2 0.003538 0.4986
## b_10low2 -1.2717e-04 0.4999
## b_5inc2 0.004864 0.4981
## b_10inc2 NaN NaN

Perhaps it is correct, but I feel as though I have an error given the NA estimates in the output, which look like they come from the Hessian matrix not being symmetrical. I've tried a lot of specification trial and error, and I believe specification is my issue. I had trouble finding details about coding the specification for a labelled design, but if it is readily available in the manual or elsewhere, I'm happy to check if you can direct me, and I apologize for missing it. Otherwise, I was wondering whether you could help me troubleshoot or at least rule out specification as my issue. Thank you so much for all the resources you provide and this forum, and I look forward to hearing from you.

Kyle
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Possible model specification error for labelled design

Post by stephanehess »

Kyle

You seem to have two alternatives, so you can only estimate 1 constant. That's the problem (at least the first one, so let's see what happens once you add a normalisation)

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
kylep
Posts: 6
Joined: 08 Mar 2022, 14:48

Re: Possible model specification error for labelled design

Post by kylep »

Great, thanks! I modified the specification:

V <- list()
V[['alt1']] = asc1 + b_4hours1*X4.hours1.1 + b_8hours1*X8.hours1.1 +
b_10cg1*X.10.caregiver1.1 +
b_20cg1*X.20.caregiver1.1 + b_10dec1*X10..decrease1.1 + b_20dec1*X20..decrease1.1 +
b_5low1*X5..lower1.1 + b_10low1*X10..lower1.1 + b_5inc1*X5..increase1.1 +
b_10inc1*X10..increase1.1
V[['alt2']] = asc1 +
b_4hours2*X4.hours2.2 + b_8hours2*X8.hours2.2 +
b_10cg2*X.10.caregiver2.2 + b_20cg2*X.20.caregiver2.2 + b_10dec2*X10..decrease2.2 +
b_20dec2*X20..decrease2.2 + b_5low2*X5..lower2.2 + b_10low2*X10..lower2.2 +
b_5inc2*X5..increase2.2 + b_10inc2*X10..increase2.2

However, I received this error when estimating:

Testing likelihood function...

Overview of choices for MNL model component :
alt1 alt2
Times available 1038.00 1038.00
Times chosen 434.00 604.00
Percentage chosen overall 41.81 58.19
Percentage chosen when available 41.81 58.19

Pre-processing likelihood function...

Testing influence of parameters
Error in apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, : Parameter asc1 does not influence the log-likelihood of your model!

The main reason I used two constants was because I thought given a labelled design, option A has 1 constant and option B has a different constant - could you possibly clarify this for me?

Thanks again!
Kyle
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Possible model specification error for labelled design

Post by stephanehess »

Kyle

now you're using the same asc in both utilities, which is why it cannot influence the LL.

What you need to do is to normalise the ASC for one alternative to 0. Please have a look at the examples on the Apollo website, e.g. http://apollochoicemodelling.com/files/examples/1 MNL/MNL_RP.r

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
kylep
Posts: 6
Joined: 08 Mar 2022, 14:48

Re: Possible model specification error for labelled design

Post by kylep »

Got it. Apologies for the misunderstanding. I've used 0 for asc1 and 1 for asc2, but I am still receiving the Hessian matrix error and NaN estimates.

apollo_initialise()
apollo_control <- list(
modelName = "CL_apollo",
modelDescr = "DCE for Facebook Support Groups",
indivID = "ID"
)
database <- DCE.data.full.r
apollo_beta <- c(
asc1 = 0,
asc2 = 1,
b_4hours1 = 0,
b_8hours1 = 0,
b_10cg1 = 0,
b_20cg1 = 0,
b_10dec1 = 0,
b_20dec1 = 0,
b_5low1 = 0,
b_10low1 = 0,
b_5inc1 = 0,
b_10inc1 = 0,
b_4hours2 = 0,
b_8hours2 = 0,
b_10cg2 = 0,
b_20cg2 = 0,
b_10dec2 = 0,
b_20dec2 = 0,
b_5low2 = 0,
b_10low2 = 0,
b_5inc2 = 0,
b_10inc2 = 0
)

apollo_fixed <- c()
apollo_inputs <- apollo_validateInputs()
## Several observations per individual detected based on the value of ID.
## Setting panelData in apollo_control set to TRUE.
## All checks on apollo_control completed.
## All checks on database completed.
apollo_probabilities <- function(apollo_beta, apollo_inputs, functionality = "estimate"){
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))

P <- list()

V <- list()
V[['alt1']] = asc1 + b_4hours1*X4.hours1.1 + b_8hours1*X8.hours1.1 +
b_10cg1*X.10.caregiver1.1 +
b_20cg1*X.20.caregiver1.1 + b_10dec1*X10..decrease1.1 + b_20dec1*X20..decrease1.1 +
b_5low1*X5..lower1.1 + b_10low1*X10..lower1.1 + b_5inc1*X5..increase1.1 +
b_10inc1*X10..increase1.1
V[['alt2']] = asc2 +
b_4hours2*X4.hours2.2 + b_8hours2*X8.hours2.2 +
b_10cg2*X.10.caregiver2.2 + b_20cg2*X.20.caregiver2.2 + b_10dec2*X10..decrease2.2 +
b_20dec2*X20..decrease2.2 + b_5low2*X5..lower2.2 + b_10low2*X10..lower2.2 +
b_5inc2*X5..increase2.2 + b_10inc2*X10..increase2.2

mnl_settings <- list(
alternatives = c(alt1 = 1, alt2 = 2),
avail = list(alt1 = 1, alt2 = 1),
choiceVar = choice,
V = V
)

P[['model']] <- apollo_mnl(mnl_settings, functionality)
P <- apollo_panelProd(P, apollo_inputs, functionality)
P <- apollo_prepareProb(P, apollo_inputs, functionality)

return(P)
}
model <- apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)
##
## Testing likelihood function...
##
## Overview of choices for MNL model component :
## alt1 alt2
## Times available 1038.00 1038.00
## Times chosen 434.00 604.00
## Percentage chosen overall 41.81 58.19
## Percentage chosen when available 41.81 58.19
##
## Pre-processing likelihood function...
##
## Testing influence of parameters......................
## Starting main estimation
## Initial function value: -759.1656
## Initial gradient value:
## asc1 asc2 b_4hours1 b_8hours1 b_10cg1 b_20cg1
## 154.838805 -154.838805 65.484151 35.677327 51.215210 40.677327
## b_10dec1 b_20dec1 b_5low1 b_10low1 b_5inc1 b_10inc1
## -6.246908 165.677327 52.215210 70.408385 49.022034 70.139444
## b_4hours2 b_8hours2 b_10cg2 b_20cg2 b_10dec2 b_20dec2
## -53.677327 -65.484151 -62.946268 -51.215210 4.591615 6.246908
## b_5low2 b_10low2 b_5inc2 b_10inc2
## -32.215210 -52.215210 -35.677327 -49.022034
## initial value 759.165632
## iter 2 value 688.465280
## iter 3 value 585.771232
## iter 4 value 579.327905
## iter 5 value 579.180934
## iter 6 value 578.444677
## iter 7 value 573.303463
## iter 8 value 572.452526
## iter 9 value 572.445239
## iter 10 value 572.330850
## iter 11 value 571.784341
## iter 12 value 571.667235
## iter 13 value 571.656956
## iter 14 value 571.532037
## iter 15 value 571.531178
## iter 16 value 571.428088
## iter 17 value 571.428037
## iter 17 value 571.428037
## iter 17 value 571.428037
## final value 571.428037
## converged
## Additional convergence test using scaled estimation. Parameters will be
## scaled by their current estimates and additional iterations will be
## performed.
## initial value 571.428037
## iter 1 value 571.428037
## final value 571.428037
## converged
## Estimated parameters:
## Estimate
## asc1 0.177284
## asc2 0.822714
## b_4hours1 0.169234
## b_8hours1 -0.144042
## b_10cg1 0.047665
## b_20cg1 -0.131422
## b_10dec1 -0.403388
## b_20dec1 1.416601
## b_5low1 0.054070
## b_10low1 0.380410
## b_5inc1 0.007630
## b_10inc1 0.335907
## b_4hours2 -0.152092
## b_8hours2 -0.169234
## b_10cg2 -0.261042
## b_20cg2 -0.047665
## b_10dec2 0.835925
## b_20dec2 0.403388
## b_5low2 0.257196
## b_10low2 -0.054070
## b_5inc2 0.166252
## b_10inc2 -0.007630
##
## Computing covariance matrix using analytical gradient.
## 0%....25%....50%....75%....100%
## WARNING: Some eigenvalues of the Hessian are complex, indicating that
## the Hessian is not symmetrical.
## Warning in sqrt(diag(varcov)): NaNs produced
## Computing score matrix...
## Warning in sqrt(diag(robvarcov)): NaNs produced
## Calculating LL(0) for applicable models...
## Calculating LL(c) for applicable models...
## Calculating LL of each model component...
apollo_modelOutput(model, list(printPVal = TRUE))
## Model run using Apollo for R, version 0.2.6 on Darwin by kylepitzer
## www.ApolloChoiceModelling.com
##
## Model name : CL_apollo
## Model description : DCE for Facebook Support Groups
## Model run at : 2022-03-08 11:46:18
## Estimation method : bfgs
## Model diagnosis : successful convergence
## Number of individuals : 173
## Number of rows in database : 1038
## Number of modelled outcomes : 1038
##
## Number of cores used : 1
## Model without mixing
##
## LL(start) : -759.1656
## LL(0) : -719.4868
## LL(C) : -705.5029
## LL(final) : -571.428
## Rho-square (0) : 0.2058
## Adj.Rho-square (0) : 0.1752
## Rho-square (C) : 0.19
## Adj.Rho-square (C) : 0.1589
## AIC : 1186.86
## BIC : 1295.65
##
## Estimated parameters : 22
## Time taken (hh:mm:ss) : 00:00:1.56
## pre-estimation : 00:00:0.62
## estimation : 00:00:0.2
## post-estimation : 00:00:0.74
## Iterations : 21
##
## Unconstrained optimisation.
##
## Estimates:
## Estimate s.e. t.rat.(0) p(1-sided) Rob.s.e.
## asc1 0.177284 1.141e+04 1.553e-05 0.5000 NaN
## asc2 0.822714 NaN NaN NaN NaN
## b_4hours1 0.169234 NaN NaN NaN NaN
## b_8hours1 -0.144042 NaN NaN NaN NaN
## b_10cg1 0.047665 6435. 7.407e-06 0.5000 27.75
## b_20cg1 -0.131422 NaN NaN NaN 53.16
## b_10dec1 -0.403388 NaN NaN NaN NaN
## b_20dec1 1.416601 2.076e+04 6.822e-05 0.5000 NaN
## b_5low1 0.054070 NaN NaN NaN NaN
## b_10low1 0.380410 5213. 7.297e-05 0.5000 NaN
## b_5inc1 0.007630 NaN NaN NaN NaN
## b_10inc1 0.335907 2134. 1.5742e-04 0.4999 NaN
## b_4hours2 -0.152092 NaN NaN NaN 36.12
## b_8hours2 -0.169234 NaN NaN NaN NaN
## b_10cg2 -0.261042 NaN NaN NaN 49.89
## b_20cg2 -0.047665 NaN NaN NaN NaN
## b_10dec2 0.835925 2.076e+04 4.026e-05 0.5000 NaN
## b_20dec2 0.403388 2.006e+04 2.011e-05 0.5000 NaN
## b_5low2 0.257196 5213. 4.933e-05 0.5000 NaN
## b_10low2 -0.054070 1570. -3.444e-05 0.5000 NaN
## b_5inc2 0.166252 2134. 7.791e-05 0.5000 36.66
## b_10inc2 -0.007630 NaN NaN NaN NaN
## Rob.t.rat.(0) p(1-sided)
## asc1 NaN NaN
## asc2 NaN NaN
## b_4hours1 NaN NaN
## b_8hours1 NaN NaN
## b_10cg1 0.001718 0.4993
## b_20cg1 -0.002472 0.4990
## b_10dec1 NaN NaN
## b_20dec1 NaN NaN
## b_5low1 NaN NaN
## b_10low1 NaN NaN
## b_5inc1 NaN NaN
## b_10inc1 NaN NaN
## b_4hours2 -0.004211 0.4983
## b_8hours2 NaN NaN
## b_10cg2 -0.005233 0.4979
## b_20cg2 NaN NaN
## b_10dec2 NaN NaN
## b_20dec2 NaN NaN
## b_5low2 NaN NaN
## b_10low2 NaN NaN
## b_5inc2 0.004535 0.4982
## b_10inc2 NaN NaN

Kyle
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Possible model specification error for labelled design

Post by stephanehess »

Kyle

you are using 0 as starting values, but you are still estimating both constants. You need to include one of them in apollo_fixed. Please have a detailed read through the MNL chapter in the manual

Best wishes

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
kylep
Posts: 6
Joined: 08 Mar 2022, 14:48

Re: Possible model specification error for labelled design

Post by kylep »

Professor Hess,

Thank you so much for the guidance. I've reviewed both the manual chapter and code examples again. I am still getting the Hessian matrix error and NaN se's, but I think I've set up the models correctly now (prior to specification). I have two sets of betas for each alternative in my data, suffix 1.1 and 2.1 for the first alternative and 1.2 and 2.2 for the second, and I'm wondering if my issue is coming from mispecification of those in my model formula.

Thanks again for all of your help - I am learning a lot!

Kyle

Code and output:

apollo_initialise()
apollo_control <- list(
modelName = "CL_apollo",
modelDescr = "DCE for Facebook Support Groups",
indivID = "ID"
)
database <- DCE.data.full.r
apollo_beta <- c(
asc1 = 0,
asc2 = 0,
b_4hours1 = 0,
b_8hours1 = 0,
b_10cg1 = 0,
b_20cg1 = 0,
b_10dec1 = 0,
b_20dec1 = 0,
b_5low1 = 0,
b_10low1 = 0,
b_5inc1 = 0,
b_10inc1 = 0,
b_4hours2 = 0,
b_8hours2 = 0,
b_10cg2 = 0,
b_20cg2 = 0,
b_10dec2 = 0,
b_20dec2 = 0,
b_5low2 = 0,
b_10low2 = 0,
b_5inc2 = 0,
b_10inc2 = 0
)

apollo_fixed <- c("asc1")
apollo_inputs <- apollo_validateInputs()
## Several observations per individual detected based on the value of ID.
## Setting panelData in apollo_control set to TRUE.
## All checks on apollo_control completed.
## All checks on database completed.
apollo_probabilities <- function(apollo_beta, apollo_inputs, functionality = "estimate"){
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))

P <- list()

V <- list()
V[['alt1']] = asc1 + b_4hours1*X4.hours1.1 + b_8hours1*X8.hours1.1 +
b_10cg1*X.10.caregiver1.1 +
b_20cg1*X.20.caregiver1.1 + b_10dec1*X10..decrease1.1 + b_20dec1*X20..decrease1.1 +
b_5low1*X5..lower1.1 + b_10low1*X10..lower1.1 + b_5inc1*X5..increase1.1 +
b_10inc1*X10..increase1.1 + b_4hours2*X4.hours2.1 + b_8hours2*X8.hours2.1 +
b_10cg2*X.10.caregiver2.1 + b_20cg2*X.20.caregiver2.1 + b_10dec2*X10..decrease2.1 +
b_20dec2*X20..decrease2.1 + b_5low2*X5..lower2.1 + b_10low2*X10..lower2.1 +
b_5inc2*X5..increase2.1 + b_10inc2*X10..increase2.1
V[['alt2']] = asc2 + b_4hours1*X4.hours1.2 + b_8hours1*X8.hours1.2 +
b_10cg1*X.10.caregiver1.2 +
b_20cg1*X.20.caregiver1.2 + b_10dec1*X10..decrease1.2 + b_20dec1*X20..decrease1.2 +
b_5low1*X5..lower1.2 + b_10low1*X10..lower1.2 + b_5inc1*X5..increase1.2 +
b_10inc1*X10..increase1.2 +
b_4hours2*X4.hours2.2 + b_8hours2*X8.hours2.2 +
b_10cg2*X.10.caregiver2.2 + b_20cg2*X.20.caregiver2.2 + b_10dec2*X10..decrease2.2 +
b_20dec2*X20..decrease2.2 + b_5low2*X5..lower2.2 + b_10low2*X10..lower2.2 +
b_5inc2*X5..increase2.2 + b_10inc2*X10..increase2.2

mnl_settings <- list(
alternatives = c(alt1 = 1, alt2 = 2),
avail = list(alt1 = 1, alt2 = 1),
choiceVar = choice,
V = V
)

P[['model']] <- apollo_mnl(mnl_settings, functionality)
P <- apollo_panelProd(P, apollo_inputs, functionality)
P <- apollo_prepareProb(P, apollo_inputs, functionality)

return(P)
}
model <- apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)
##
## Testing likelihood function...
##
## Overview of choices for MNL model component :
## alt1 alt2
## Times available 1038.00 1038.00
## Times chosen 434.00 604.00
## Percentage chosen overall 41.81 58.19
## Percentage chosen when available 41.81 58.19
##
## Pre-processing likelihood function...
##
## Testing influence of parameters.....................
## Starting main estimation
## Initial function value: -719.4868
## Initial gradient value:
## asc2 b_4hours1 b_8hours1 b_10cg1 b_20cg1 b_10dec1 b_20dec1 b_5low1
## 85.0 -14.0 -44.5 -28.5 -39.5 -85.5 85.5 -27.5
## b_10low1 b_5inc1 b_10inc1 b_4hours2 b_8hours2 b_10cg2 b_20cg2 b_10dec2
## -10.0 -30.0 -10.5 26.5 14.0 17.0 28.5 85.0
## b_20dec2 b_5low2 b_10low2 b_5inc2 b_10inc2
## 85.5 47.5 27.5 44.5 30.0
## initial value 719.486773
## iter 2 value 669.617449
## iter 3 value 588.052338
## iter 4 value 581.898058
## iter 5 value 581.753705
## iter 6 value 580.518167
## iter 7 value 574.242344
## iter 8 value 572.774264
## iter 9 value 572.735831
## iter 10 value 572.578700
## iter 11 value 571.843982
## iter 12 value 571.806825
## iter 13 value 571.782088
## iter 14 value 571.502464
## iter 15 value 571.500596
## iter 16 value 571.428056
## iter 17 value 571.428038
## iter 17 value 571.428037
## iter 17 value 571.428037
## final value 571.428037
## converged
## Additional convergence test using scaled estimation. Parameters will be
## scaled by their current estimates and additional iterations will be
## performed.
## initial value 571.428037
## iter 1 value 571.428037
## final value 571.428037
## converged
## Estimated parameters:
## Estimate
## asc1 0.000000
## asc2 0.096954
## b_4hours1 0.114387
## b_8hours1 -0.253739
## b_10cg1 -0.007185
## b_20cg1 -0.241120
## b_10dec1 -0.458236
## b_20dec1 1.306904
## b_5low1 -7.7814e-04
## b_10low1 0.270713
## b_5inc1 -0.047218
## b_10inc1 0.226210
## b_4hours2 -0.042399
## b_8hours2 -0.114387
## b_10cg2 -0.151351
## b_20cg2 0.007185
## b_10dec2 0.945620
## b_20dec2 0.458236
## b_5low2 0.366889
## b_10low2 7.7814e-04
## b_5inc2 0.275946
## b_10inc2 0.047218
##
## Computing covariance matrix using analytical gradient.
## 0%....25%....50%....75%...100%
## WARNING: Some eigenvalues of the Hessian are complex, indicating that
## the Hessian is not symmetrical.
## Warning in sqrt(diag(varcov)): NaNs produced
## Computing score matrix...
## Warning in sqrt(diag(robvarcov)): NaNs produced
## Calculating LL(0) for applicable models...
## Calculating LL(c) for applicable models...
## Calculating LL of each model component...
apollo_modelOutput(model, list(printPVal = TRUE))
## Model run using Apollo for R, version 0.2.6 on Darwin by kylepitzer
## www.ApolloChoiceModelling.com
##
## Model name : CL_apollo
## Model description : DCE for Facebook Support Groups
## Model run at : 2022-03-09 10:05:33
## Estimation method : bfgs
## Model diagnosis : successful convergence
## Number of individuals : 173
## Number of rows in database : 1038
## Number of modelled outcomes : 1038
##
## Number of cores used : 1
## Model without mixing
##
## LL(start) : -719.4868
## LL(0) : -719.4868
## LL(C) : -705.5029
## LL(final) : -571.428
## Rho-square (0) : 0.2058
## Adj.Rho-square (0) : 0.1766
## Rho-square (C) : 0.19
## Adj.Rho-square (C) : 0.1603
## AIC : 1184.86
## BIC : 1288.7
##
## Estimated parameters : 21
## Time taken (hh:mm:ss) : 00:00:1.82
## pre-estimation : 00:00:0.93
## estimation : 00:00:0.17
## post-estimation : 00:00:0.73
## Iterations : 21
##
## Unconstrained optimisation.
##
## Estimates:
## Estimate s.e. t.rat.(0) p(1-sided) Rob.s.e.
## asc1 0.000000 NA NA NA NA
## asc2 0.096954 1.097e+04 8.840e-06 0.5000 26.80
## b_4hours1 0.114387 7936.5 1.441e-05 0.5000 45.81
## b_8hours1 -0.253739 NaN NaN NaN 36.78
## b_10cg1 -0.007185 NaN NaN NaN 31.38
## b_20cg1 -0.241120 NaN NaN NaN NaN
## b_10dec1 -0.458236 3.516e+04 -1.303e-05 0.5000 598.47
## b_20dec1 1.306904 1.039e+04 1.2575e-04 0.4999 NaN
## b_5low1 -7.7814e-04 844.9 -9.209e-07 0.5000 76.02
## b_10low1 0.270713 NaN NaN NaN NaN
## b_5inc1 -0.047218 NaN NaN NaN NaN
## b_10inc1 0.226210 5174.5 4.372e-05 0.5000 NaN
## b_4hours2 -0.042399 NaN NaN NaN NaN
## b_8hours2 -0.114387 9890.9 -1.156e-05 0.5000 NaN
## b_10cg2 -0.151351 NaN NaN NaN NaN
## b_20cg2 0.007185 1509.5 4.760e-06 0.5000 NaN
## b_10dec2 0.945620 1.039e+04 9.099e-05 0.5000 NaN
## b_20dec2 0.458236 NaN NaN NaN 539.95
## b_5low2 0.366889 NaN NaN NaN 32.59
## b_10low2 7.7814e-04 841.6 9.246e-07 0.5000 25.40
## b_5inc2 0.275946 5174.5 5.333e-05 0.5000 NaN
## b_10inc2 0.047218 NaN NaN NaN 11.39
## Rob.t.rat.(0) p(1-sided)
## asc1 NA NA
## asc2 0.003618 0.4986
## b_4hours1 0.002497 0.4990
## b_8hours1 -0.006898 0.4972
## b_10cg1 -2.2894e-04 0.4999
## b_20cg1 NaN NaN
## b_10dec1 -7.6568e-04 0.4997
## b_20dec1 NaN NaN
## b_5low1 -1.024e-05 0.5000
## b_10low1 NaN NaN
## b_5inc1 NaN NaN
## b_10inc1 NaN NaN
## b_4hours2 NaN NaN
## b_8hours2 NaN NaN
## b_10cg2 NaN NaN
## b_20cg2 NaN NaN
## b_10dec2 NaN NaN
## b_20dec2 8.4866e-04 0.4997
## b_5low2 0.011259 0.4955
## b_10low2 3.064e-05 0.5000
## b_5inc2 NaN NaN
## b_10inc2 0.004146 0.4983
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Possible model specification error for labelled design

Post by stephanehess »

are your variables categorical? You'll need normalisations for categorical variables too, so fixing one of the parameters to zero for each one
--------------------------------
Stephane Hess
www.stephanehess.me.uk
kylep
Posts: 6
Joined: 08 Mar 2022, 14:48

Re: Possible model specification error for labelled design

Post by kylep »

Okay, great. I finally have some non-NaN output - will post below. A few data-related questions here though. For context, if it's helpful, I used the support.CEs package to set up the data. Here is what the head of the database I bring into apollo looks like:

ID BLOCK QES STR RES.1 ASC.1 X4.hours1.1 X8.hours1.1 X.10.caregiver1.1
1 1 1 1 101 FALSE 1 0 1 0
3 1 1 2 102 TRUE 1 1 0 0
5 1 1 3 103 FALSE 1 0 1 1
7 1 1 4 104 FALSE 1 0 0 0
9 1 1 5 105 TRUE 1 1 0 0
11 1 1 6 106 TRUE 1 0 1 0
X.20.caregiver1.1 X10..decrease1.1 X20..decrease1.1 X5..lower1.1
1 0 1 0 0
3 1 0 0 1
5 0 0 0 1
7 1 0 1 1
9 0 0 1 0
11 1 0 1 0
X10..lower1.1 X5..increase1.1 X10..increase1.1 X4.hours2.1 X8.hours2.1
1 1 0 0 0 0
3 0 0 1 0 0
5 0 0 0 0 0
7 0 0 0 0 0
9 0 0 1 0 0
11 1 0 1 0 0
X.10.caregiver2.1 X.20.caregiver2.1 X10..decrease2.1 X20..decrease2.1
1 0 0 0 0
3 0 0 0 0
5 0 0 0 0
7 0 0 0 0
9 0 0 0 0
11 0 0 0 0
X5..lower2.1 X10..lower2.1 X5..increase2.1 X10..increase2.1 RES.2 ASC.2
1 0 0 0 0 TRUE 0
3 0 0 0 0 FALSE 0
5 0 0 0 0 TRUE 0
7 0 0 0 0 TRUE 0
9 0 0 0 0 FALSE 0
11 0 0 0 0 FALSE 0
X4.hours1.2 X8.hours1.2 X.10.caregiver1.2 X.20.caregiver1.2 X10..decrease1.2
1 0 0 0 0 0
3 0 0 0 0 0
5 0 0 0 0 0
7 0 0 0 0 0
9 0 0 0 0 0
11 0 0 0 0 0
X20..decrease1.2 X5..lower1.2 X10..lower1.2 X5..increase1.2 X10..increase1.2
1 0 0 0 0 0
3 0 0 0 0 0
5 0 0 0 0 0
7 0 0 0 0 0
9 0 0 0 0 0
11 0 0 0 0 0
X4.hours2.2 X8.hours2.2 X.10.caregiver2.2 X.20.caregiver2.2 X10..decrease2.2
1 0 0 1 0 0
3 0 1 0 0 1
5 0 0 0 1 1
7 1 0 0 0 0
9 0 1 1 0 0
11 0 0 0 0 0
X20..decrease2.2 X5..lower2.2 X10..lower2.2 X5..increase2.2 X10..increase2.2
1 1 0 0 1 0
3 0 0 1 0 0
5 0 0 1 1 0
7 0 0 1 1 0
9 0 1 0 0 0
11 0 0 0 0 0
choice
1 2
3 1
5 2
7 2
9 1
11 1

So for the first alternative all of the 1.1 suffix variables are the values that were present in each scenario presented to participants, whereas the 2.1 suffix values are all zero. The same is the case for the second alternative, 2.2 (scenario values) and 1.2 (zeroes). I assume since it is labelled, this has something to do with creating a reference for each attribute for each alternative? In addition, the 0 value for each categorical variable is left out when creating the DCE matrix and data set using support.CEs - each variable actually has 3 levels - the 0 level (no change) and then 2 change levels that have increasing values, e.g., 4 hours of time/8 hours of time or 10% cost decrease/20% cost decrease.

I suppose the short version of this question is, how do I understand the estimates for the attributes given this context?

Here is the model and output. I assume for the ASC2 estimate, I read this as there being a greater preference for the second alternative compared to the first since it's positive, but let me know if this is incorrect. Also let me know if you think the specification should be modified.

apollo_initialise()
apollo_control <- list(
modelName = "CL_apollo",
modelDescr = "DCE for Facebook Support Groups",
indivID = "ID"
)
database <- DCE.data.full.r
apollo_beta <- c(
asc1 = 0,
asc2 = 0,
b_4hours1 = 0,
b_8hours1 = 0,
b_10cg1 = 0,
b_20cg1 = 0,
b_10dec1 = 0,
b_20dec1 = 0,
b_5low1 = 0,
b_10low1 = 0,
b_5inc1 = 0,
b_10inc1 = 0,
b_4hours2 = 0,
b_8hours2 = 0,
b_10cg2 = 0,
b_20cg2 = 0,
b_10dec2 = 0,
b_20dec2 = 0,
b_5low2 = 0,
b_10low2 = 0,
b_5inc2 = 0,
b_10inc2 = 0
)

apollo_fixed <- c("asc1", "b_4hours1", "b_10cg1", "b_10dec1", "b_5low1", "b_5inc1", "b_4hours2", "b_10cg2", "b_10dec2", "b_5low2", "b_5inc2")
apollo_inputs <- apollo_validateInputs()
## Several observations per individual detected based on the value of ID.
## Setting panelData in apollo_control set to TRUE.
## All checks on apollo_control completed.
## All checks on database completed.
apollo_probabilities <- function(apollo_beta, apollo_inputs, functionality = "estimate"){
apollo_attach(apollo_beta, apollo_inputs)
on.exit(apollo_detach(apollo_beta, apollo_inputs))

P <- list()

V <- list()
V[['alt1']] = asc1 + b_4hours1*X4.hours1.1 + b_8hours1*X8.hours1.1 +
b_10cg1*X.10.caregiver1.1 +
b_20cg1*X.20.caregiver1.1 + b_10dec1*X10..decrease1.1 + b_20dec1*X20..decrease1.1 +
b_5low1*X5..lower1.1 + b_10low1*X10..lower1.1 + b_5inc1*X5..increase1.1 +
b_10inc1*X10..increase1.1 + b_4hours2*X4.hours2.1 + b_8hours2*X8.hours2.1 +
b_10cg2*X.10.caregiver2.1 + b_20cg2*X.20.caregiver2.1 + b_10dec2*X10..decrease2.1 +
b_20dec2*X20..decrease2.1 + b_5low2*X5..lower2.1 + b_10low2*X10..lower2.1 +
b_5inc2*X5..increase2.1 + b_10inc2*X10..increase2.1
V[['alt2']] = asc2 + b_4hours1*X4.hours1.2 + b_8hours1*X8.hours1.2 +
b_10cg1*X.10.caregiver1.2 +
b_20cg1*X.20.caregiver1.2 + b_10dec1*X10..decrease1.2 + b_20dec1*X20..decrease1.2 +
b_5low1*X5..lower1.2 + b_10low1*X10..lower1.2 + b_5inc1*X5..increase1.2 +
b_10inc1*X10..increase1.2 +
b_4hours2*X4.hours2.2 + b_8hours2*X8.hours2.2 +
b_10cg2*X.10.caregiver2.2 + b_20cg2*X.20.caregiver2.2 + b_10dec2*X10..decrease2.2 +
b_20dec2*X20..decrease2.2 + b_5low2*X5..lower2.2 + b_10low2*X10..lower2.2 +
b_5inc2*X5..increase2.2 + b_10inc2*X10..increase2.2

mnl_settings <- list(
alternatives = c(alt1 = 1, alt2 = 2),
avail = list(alt1 = 1, alt2 = 1),
choiceVar = choice,
V = V
)

P[['model']] <- apollo_mnl(mnl_settings, functionality)
P <- apollo_panelProd(P, apollo_inputs, functionality)
P <- apollo_prepareProb(P, apollo_inputs, functionality)

return(P)
}
model <- apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)
##
## Testing likelihood function...
##
## Overview of choices for MNL model component :
## alt1 alt2
## Times available 1038.00 1038.00
## Times chosen 434.00 604.00
## Percentage chosen overall 41.81 58.19
## Percentage chosen when available 41.81 58.19
##
## Pre-processing likelihood function...
##
## Testing influence of parameters...........
## Starting main estimation
## Initial function value: -719.4868
## Initial gradient value:
## asc2 b_8hours1 b_20cg1 b_20dec1 b_10low1 b_10inc1 b_8hours2 b_20cg2
## 85.0 -44.5 -39.5 85.5 -10.0 -10.5 14.0 28.5
## b_20dec2 b_10low2 b_10inc2
## 85.5 27.5 30.0
## initial value 719.486773
## iter 2 value 710.106043
## iter 3 value 629.051958
## iter 4 value 610.430881
## iter 5 value 607.269086
## iter 6 value 601.838210
## iter 7 value 600.355339
## iter 8 value 590.650173
## iter 9 value 585.426839
## iter 10 value 580.874318
## iter 11 value 579.737850
## iter 12 value 577.209811
## iter 13 value 574.511309
## iter 14 value 573.636285
## iter 15 value 571.492996
## iter 16 value 571.428692
## iter 17 value 571.428056
## iter 18 value 571.428037
## iter 18 value 571.428037
## iter 18 value 571.428037
## final value 571.428037
## converged
## Additional convergence test using scaled estimation. Parameters will be
## scaled by their current estimates and additional iterations will be
## performed.
## initial value 571.428037
## iter 1 value 571.428037
## final value 571.428037
## converged
## Estimated parameters:
## Estimate
## asc1 0.00000
## asc2 1.49166
## b_4hours1 0.00000
## b_8hours1 -0.29614
## b_10cg1 0.00000
## b_20cg1 -0.39248
## b_10dec1 0.00000
## b_20dec1 2.25253
## b_5low1 0.00000
## b_10low1 0.63761
## b_5inc1 0.00000
## b_10inc1 0.50217
## b_4hours2 0.00000
## b_8hours2 -0.18638
## b_10cg2 0.00000
## b_20cg2 0.16572
## b_10dec2 0.00000
## b_20dec2 -0.02915
## b_5low2 0.00000
## b_10low2 -0.36533
## b_5inc2 0.00000
## b_10inc2 -0.18151
##
## Computing covariance matrix using analytical gradient.
## 0%....25%....50%....75%..100%
## Negative definite Hessian with maximum eigenvalue: -8.660342
## Computing score matrix...
## Calculating LL(0) for applicable models...
## Calculating LL(c) for applicable models...
## Calculating LL of each model component...
apollo_modelOutput(model, list(printPVal = TRUE))
## Model run using Apollo for R, version 0.2.6 on Darwin by kylepitzer
## www.ApolloChoiceModelling.com
##
## Model name : CL_apollo
## Model description : DCE for Facebook Support Groups
## Model run at : 2022-03-10 09:37:12
## Estimation method : bfgs
## Model diagnosis : successful convergence
## Number of individuals : 173
## Number of rows in database : 1038
## Number of modelled outcomes : 1038
##
## Number of cores used : 1
## Model without mixing
##
## LL(start) : -719.4868
## LL(0) : -719.4868
## LL(C) : -705.5029
## LL(final) : -571.428
## Rho-square (0) : 0.2058
## Adj.Rho-square (0) : 0.1905
## Rho-square (C) : 0.19
## Adj.Rho-square (C) : 0.1744
## AIC : 1164.86
## BIC : 1219.25
##
## Estimated parameters : 11
## Time taken (hh:mm:ss) : 00:00:1.29
## pre-estimation : 00:00:0.64
## estimation : 00:00:0.21
## post-estimation : 00:00:0.44
## Iterations : 21
## Min abs eigenvalue of Hessian : 8.660342
##
## Unconstrained optimisation.
##
## Estimates:
## Estimate s.e. t.rat.(0) p(1-sided) Rob.s.e.
## asc1 0.00000 NA NA NA NA
## asc2 1.49166 0.2550 5.8492 2.469e-09 0.2599
## b_4hours1 0.00000 NA NA NA NA
## b_8hours1 -0.29614 0.1798 -1.6475 0.049732 0.1758
## b_10cg1 0.00000 NA NA NA NA
## b_20cg1 -0.39248 0.1797 -2.1836 0.014496 0.1550
## b_10dec1 0.00000 NA NA NA NA
## b_20dec1 2.25253 0.1817 12.3997 0.000000 0.2292
## b_5low1 0.00000 NA NA NA NA
## b_10low1 0.63761 0.1853 3.4418 2.8892e-04 0.1618
## b_5inc1 0.00000 NA NA NA NA
## b_10inc1 0.50217 0.1807 2.7791 0.002725 0.1458
## b_4hours2 0.00000 NA NA NA NA
## b_8hours2 -0.18638 0.1741 -1.0704 0.142222 0.1563
## b_10cg2 0.00000 NA NA NA NA
## b_20cg2 0.16572 0.1765 0.9392 0.173823 0.1418
## b_10dec2 0.00000 NA NA NA NA
## b_20dec2 -0.02915 0.1804 -0.1616 0.435811 0.1700
## b_5low2 0.00000 NA NA NA NA
## b_10low2 -0.36533 0.1845 -1.9797 0.023871 0.1942
## b_5inc2 0.00000 NA NA NA NA
## b_10inc2 -0.18151 0.1825 -0.9948 0.159913 0.1639
## Rob.t.rat.(0) p(1-sided)
## asc1 NA NA
## asc2 5.7386 4.773e-09
## b_4hours1 NA NA
## b_8hours1 -1.6850 0.045999
## b_10cg1 NA NA
## b_20cg1 -2.5324 0.005665
## b_10dec1 NA NA
## b_20dec1 9.8271 0.000000
## b_5low1 NA NA
## b_10low1 3.9417 4.045e-05
## b_5inc1 NA NA
## b_10inc1 3.4434 2.8725e-04
## b_4hours2 NA NA
## b_8hours2 -1.1922 0.116600
## b_10cg2 NA NA
## b_20cg2 1.1683 0.121340
## b_10dec2 NA NA
## b_20dec2 -0.1715 0.431910
## b_5low2 NA NA
## b_10low2 -1.8813 0.029962
## b_5inc2 NA NA
## b_10inc2 -1.1075 0.134034

As I mentioned I am completely new to apollo and DCE in general, so I cannot stress how incredibly helpful you've been. Many, many thanks and look forward to continuing the discussion.

Kyle
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Possible model specification error for labelled design

Post by stephanehess »

Kyle

these questions are no longer about Apollo per se, but about the interpretation of estimates from choice models. While we do occasionally answer such questions, in your case, this relates to a very basic/standard model, so I suggest you have a look at the excellent discussions in the literature, maybe starting with Kenneth Train's textbook

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
Post Reply