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.

Error in testing influence of parameters of Nested Logit Model

Ask questions about errors you encouunter. Please make sure to include full details about your model specifications, and ideally your model file.
Post Reply
fazafawzan
Posts: 3
Joined: 10 Mar 2021, 05:31

Error in testing influence of parameters of Nested Logit Model

Post by fazafawzan »

Dear Everyone,

I was trying to develop a new model framework to investigate commuters’ behavior and response toward the presence of Light Rapid Transit with two levels of nested logit model framework. The nested logit model framework is attached in this post where the upper level represents commuters mode choice (LRT and non-LRT) while the lower level indicates the travel characteristics (simple trip-chain and complex trip-chain).
However, the error came up when testing the influence of parameters was conducted as follows:
"Error in apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, :
Parameter b_gender does not influence the log-likelihood of your model!"


When I tried to waived that particular parameter (i.e. b_gender), the same error message still appeared but with other parameters (i.e. b_age1, b_age2, etc.).

My modified code is as follows:

Code: Select all

# ################################################################# #
#### LOAD LIBRARY AND DEFINE CORE SETTINGS                       ####
# ################################################################# #

### Clear memory
rm(list = ls())

### Load Apollo library
library(apollo)

### Initialise code
apollo_initialise()

### Set core controls
apollo_control = list(
  modelName  ="Apollo_LRT_NL_modeAboveTripChain_02",
  modelDescr ="Two-level NL model with SP data where mode choice is above the trip chain typology",
  indivID    ="ID"
)

# ################################################################# #
#### LOAD DATA AND APPLY ANY TRANSFORMATIONS                     ####
# ################################################################# #

database = read.csv("apollo_statedPreferenceData_NL.csv",header=TRUE)

### Use only SP data
# database = subset(database,database$SP==1)

### Create new variable with average income
# database$mean_income = mean(database$income)

# ################################################################# #
#### DEFINE MODEL PARAMETERS                                     ####
# ################################################################# #

### Vector of parameters, including any that are kept fixed in estimation
apollo_beta=c(asc_lrt_stc           = 0,
              asc_lrt_ctc           = 0,
              asc_nonlrt_stc        = 0,
              asc_nonlrt_ctc        = 0,
              #asc_bus_shift_female  = 0,
              #asc_air_shift_female  = 0,
              #asc_rail_shift_female = 0,
              #b_tt_shift_business   = 0,
              b_stc                  = 0,
              b_ctc                  = 0,
              b_lrt_cost1               = 0,
              b_lrt_cost2               = 0,
              b_lrt_cost3               = 0,
              b_lrt_time1               = 0,
              b_lrt_time2               = 0,
              b_lrt_waiting1            = 0,
              b_lrt_waiting2            = 0,
              b_lrt_transfer            = 0,
              b_nonlrt_cost1               = 0,
              b_nonlrt_cost2               = 0,
              b_nonlrt_cost3               = 0,
              b_nonlrt_time1               = 0,
              b_nonlrt_time2               = 0,
              b_nonlrt_waiting1            = 0,
              b_nonlrt_waiting2            = 0,
              b_nonlrt_transfer            = 0,
              b_gender              = 0,
              b_age1                = 0,
              b_age2                = 0,
              b_income1             = 0,
              b_income2             = 0,
              b_veh_av              = 0,
              b_car_av              = 0,
              b_work                = 0,
              #b_cost_shift_business = 0,
              #cost_income_elast     = 0,
              #b_no_frills           = 0,
              #b_wifi                = 0,
              #b_food                = 0,
              lambda_nonLRT          = 0.7,
              lambda_LRT             = 0.3)

### Vector with names (in quotes) of parameters to be kept fixed at their starting value in apollo_beta, use apollo_beta_fixed = c() if none
apollo_fixed = c("asc_lrt_stc","b_nonlrt_transfer")

### Read in starting values for at least some parameters from existing model output file
 apollo_beta=apollo_readBeta(apollo_beta,apollo_fixed,"Apollo_MNL_example_estimates",overwriteFixed=FALSE)

# ################################################################# #
#### GROUP AND VALIDATE INPUTS                                   ####
# ################################################################# #

apollo_inputs = apollo_validateInputs()

# ################################################################# #
#### DEFINE MODEL AND LIKELIHOOD FUNCTION                        ####
# ################################################################# #

apollo_probabilities=function(apollo_beta, apollo_inputs, functionality="estimate"){
  
  ### Attach inputs and detach after function exit
  apollo_attach(apollo_beta, apollo_inputs)
  on.exit(apollo_detach(apollo_beta, apollo_inputs))
  
  ### Create list of probabilities P
  P = list()
  
  ### Create alternative specific constants and coefficients using interactions with socio-demographics
  #asc_lrt_ctc_value     = asc_lrt_ctc    + b_gender*gender + b_age1*age1 + b_age2*age2 + b_income1*income1 + b_income2*income2 + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_ctc*ctc
  #asc_nonlrt_stc_value  = asc_nonlrt_stc + b_gender*gender + b_age1*age1 + b_age2*age2 + b_income1*income1 + b_income2*income2 + b_veh_av*veh_av + b_car_av*car_av + b_work*work
  #asc_nonlrt_ctc_value  = asc_nonlrt_ctc + b_gender*gender + b_age1*age1 + b_age2*age2 + b_income1*income1 + b_income2*income2 + b_veh_av*veh_av + b_car_av*car_av + b_work*work
  #b_tt_car_value  = b_tt_car + b_tt_shift_business * business
  #b_tt_bus_value  = b_tt_bus + b_tt_shift_business * business
  #b_tt_air_value  = b_tt_air + b_tt_shift_business * business
  #b_tt_rail_value = b_tt_rail + b_tt_shift_business * business
  #b_cost_value    = ( b_cost +  b_cost_shift_business * business ) * ( income / mean_income ) ^ cost_income_elast
  
  ### List of utilities: these must use the same names as in nl_settings, order is irrelevant
  V = list()
  V[['lrt_stc']]    = asc_lrt_stc     + b_lrt_cost1*(cost==1) + b_lrt_cost2*(cost==2) + b_lrt_cost3*(cost==3) + b_lrt_time1*(time==1) + b_lrt_time2*(time==2) + b_lrt_waiting1*(waiting==1) + b_lrt_waiting2*(waiting==2) + b_lrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_stc*(tripchain==1) + b_gender*gender #+b_tt_car_value  * time_car + b_cost_value * cost_car
  V[['lrt_ctc']]    = asc_lrt_ctc     + b_lrt_cost1*(cost==1) + b_lrt_cost2*(cost==2) + b_lrt_cost3*(cost==3) + b_lrt_time1*(time==1) + b_lrt_time2*(time==2) + b_lrt_waiting1*(waiting==1) + b_lrt_waiting2*(waiting==2) + b_lrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_ctc*(tripchain==2) + b_gender*gender  #+ b_tt_bus_value  * time_bus  + b_access * access_bus  + b_cost_value * cost_bus 
  V[['nonlrt_stc']] = asc_nonlrt_stc  + b_nonlrt_cost1*(cost==1) + b_nonlrt_cost2*(cost==2) + b_nonlrt_cost3*(cost==3) + b_nonlrt_time1*(time==1) + b_nonlrt_time2*(time==2) + b_nonlrt_waiting1*(waiting==1) + b_nonlrt_waiting2*(waiting==2) + b_nonlrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_gender*gender  #+ b_tt_air_value  * time_air  + b_access * access_air  + b_cost_value * cost_air   + b_no_frills * ( service_air == 1 )  + b_wifi * ( service_air == 2 )  + b_food * ( service_air == 3 )
  V[['nonlrt_ctc']] = asc_nonlrt_ctc  + b_nonlrt_cost1*(cost==1) + b_nonlrt_cost2*(cost==2) + b_nonlrt_cost3*(cost==3) + b_nonlrt_time1*(time==1) + b_nonlrt_time2*(time==2) + b_nonlrt_waiting1*(waiting==1) + b_nonlrt_waiting2*(waiting==2) + b_nonlrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_gender*gender  #+b_tt_rail_value * time_rail + b_access * access_rail + b_cost_value * cost_rail  + b_no_frills * ( service_rail == 1 ) + b_wifi * ( service_rail == 2 ) + b_food * ( service_rail == 3 )
  
  ### Specify nests for NL model
  nlNests      = list(root=1, LRT=lambda_LRT, nonLRT=lambda_nonLRT)
  
  ### Specify tree structure for NL model
  nlStructure= list()
  nlStructure[["root"]]   = c("LRT","nonLRT")
  nlStructure[["LRT"]]    = c("lrt_stc","lrt_ctc")
  nlStructure[["nonLRT"]] = c("nonlrt_stc", "nonlrt_ctc")
  
  ### Define settings for NL model
  nl_settings <- list(
    alternatives = c(lrt_stc=1, lrt_ctc=2, nonlrt_stc=3, nonlrt_ctc=4),
    avail        = list(lrt_stc=av_alt1, lrt_ctc=av_alt2, nonlrt_stc=av_alt3, nonlrt_ctc=av_alt4),
    choiceVar    = choice,
    V            = V,
    nlNests      = nlNests,
    nlStructure  = nlStructure
  )
  
  ### Compute probabilities using NL model
  P[["model"]] = apollo_nl(nl_settings, functionality)
  
  ### Take product across observation for same individual
  P = apollo_panelProd(P, apollo_inputs, functionality)
  
  ### Prepare and return outputs of function
  P = apollo_prepareProb(P, apollo_inputs, functionality)
  return(P)
}

# ################################################################# #
#### MODEL ESTIMATION                                            ####
# ################################################################# #

model = apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)

# ################################################################# #
#### MODEL OUTPUTS                                               ####
# ################################################################# #

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO SCREEN)                               ----
# ----------------------------------------------------------------- #

apollo_modelOutput(model)

# ----------------------------------------------------------------- #
#---- FORMATTED OUTPUT (TO FILE, using model name)               ----
# ----------------------------------------------------------------- #

apollo_saveOutput(model)

# ################################################################# #
##### POST-PROCESSING                                            ####
# ################################################################# #

### Print outputs of additional diagnostics to new output file (remember to close file writing when complete)
sink(paste(model$apollo_control$modelName,"_additional_output.txt",sep=""),split=TRUE)

# ----------------------------------------------------------------- #
#---- LR TEST AGAINST MNL MODEL                                  ----
# ----------------------------------------------------------------- #

apollo_lrTest("Apollo_MNL_example", "Apollo_NL_example")
apollo_lrTest("Apollo_MNL_example", model)

# ----------------------------------------------------------------- #
#---- switch off writing to file                                 ----
# ----------------------------------------------------------------- #

if(sink.number()>0) sink()
Lastly, I would like to say thank you to Stephane and David for developing the Apollo package. I have used the previous version of Apollo for my dissertation and it has been published in a Scopus Q2 journal. Also, thank you in advance for taking the time to read this issue.
Attachments
NL Framework.jpg
NL Framework.jpg (22.83 KiB) Viewed 6592 times
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Error in testing influence of parameters of Nested Logit Model

Post by stephanehess »

Hi

it looks like these parameters that you are talking about are used in all of the utilities, so they cannot influence the likelihood - your model is overspecified

Best wishes

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
fazafawzan
Posts: 3
Joined: 10 Mar 2021, 05:31

Re: Error in testing influence of parameters of Nested Logit Model

Post by fazafawzan »

Dear Prof. Stephane,

I have revised the code to not use these parameters or attributes in all of the utilities. The previous error for particular parameters has no longer appeared. However, the same error still appeared --this time, the error happens for the lambda parameter-- as follows:
Parameter lambda_nonLRT does not influence the log-likelihood of your model!

I attached the code and also the results of the analysis below.

It would be very delightful if this problem is solved, thank you very much in advance.

Code: Select all

># ################################################################# #
> #### LOAD LIBRARY AND DEFINE CORE SETTINGS                       ####
> # ################################################################# #
> 
> ### Clear memory
> rm(list = ls())
> 
> ### Load Apollo library
> library(apollo)
> 
> ### Initialise code
> apollo_initialise()
Apollo ignition sequence completed
> 
> ### Set core controls
> apollo_control = list(
+   modelName  ="Apollo_LRT_NL_modeAboveTripChain_02",
+   modelDescr ="Two-level NL model with SP data where mode choice is above the trip chain typology",
+   indivID    ="ID"
+ )
> 
> # ################################################################# #
> #### LOAD DATA AND APPLY ANY TRANSFORMATIONS                     ####
> # ################################################################# #
> 
> database = read.csv("apollo_statedPreferenceData_NL.csv",header=TRUE)
> 
> ### Use only SP data
> # database = subset(database,database$SP==1)
> 
> ### Create new variable with average income
> # database$mean_income = mean(database$income)
> 
> # ################################################################# #
> #### DEFINE MODEL PARAMETERS                                     ####
> # ################################################################# #
> 
> ### Vector of parameters, including any that are kept fixed in estimation
> apollo_beta=c(asc_lrt_stc           = 0,
+               asc_lrt_ctc           = 0,
+               asc_nonlrt_stc        = 0,
+               asc_nonlrt_ctc        = 0,
+               b_stc                 = 0,
+               b_ctc                 = 0,
+               b_lrt_cost1           = 0,
+               b_lrt_cost2           = 0,
+               b_lrt_cost3           = 0,
+               b_lrt_time1           = 0,
+               b_lrt_time2           = 0,
+               b_lrt_waiting1        = 0,
+               b_lrt_waiting2        = 0,
+               b_lrt_transfer        = 0,
+               b_nonlrt_cost1        = 0,
+               b_nonlrt_cost2        = 0,
+               b_nonlrt_cost3        = 0,
+               b_nonlrt_time1        = 0,
+               b_nonlrt_time2        = 0,
+               b_nonlrt_waiting1     = 0,
+               b_nonlrt_waiting2     = 0,
+               b_nonlrt_transfer     = 0,
+               b_gender              = 0,
+               b_age1                = 0,
+               b_age2                = 0,
+               b_income1             = 0,
+               b_income2             = 0,
+               b_veh_av              = 0,
+               b_car_av              = 0,
+               b_work                = 0,
+               lambda_nonLRT         = 0.5,
+               lambda_LRT            = 0.5)
> 
> ### Vector with names (in quotes) of parameters to be kept fixed at their starting value in apollo_beta, use apollo_beta_fixed = c() if none
> apollo_fixed = c("asc_lrt_stc","b_nonlrt_transfer")
> 
> ### Read in starting values for at least some parameters from existing model output file
>  apollo_beta=apollo_readBeta(apollo_beta,apollo_fixed,"Apollo_MNL_example_estimates",overwriteFixed=FALSE)
Error in apollo_readBeta(apollo_beta, apollo_fixed, "Apollo_MNL_example_estimates",  : 
  File Apollo_MNL_example_estimates_estimates.csv not found!
> 
> # ################################################################# #
> #### GROUP AND VALIDATE INPUTS                                   ####
> # ################################################################# #
> 
> 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.
> 
> # ################################################################# #
> #### DEFINE MODEL AND LIKELIHOOD FUNCTION                        ####
> # ################################################################# #
> 
> apollo_probabilities=function(apollo_beta, apollo_inputs, functionality="estimate"){
+   
+   ### Attach inputs and detach after function exit
+   apollo_attach(apollo_beta, apollo_inputs)
+   on.exit(apollo_detach(apollo_beta, apollo_inputs))
+   
+   ### Create list of probabilities P
+   P = list()
+   
+   ### List of utilities: these must use the same names as in nl_settings, order is irrelevant
+   V = list()
+   V[['lrt_stc']]    = asc_lrt_stc     + b_lrt_cost1*(cost==1) + b_lrt_cost2*(cost==2) + b_lrt_cost3*(cost==3) + b_lrt_time1*(time==1) + b_lrt_time2*(time==2) + b_lrt_waiting1*(waiting==1) + b_lrt_waiting2*(waiting==2) + b_lrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_gender*gender + b_stc*(tripchain==1) 
+   V[['lrt_ctc']]    = asc_lrt_ctc     + b_lrt_cost1*(cost==1) + b_lrt_cost2*(cost==2) + b_lrt_cost3*(cost==3) + b_lrt_time1*(time==1) + b_lrt_time2*(time==2) + b_lrt_waiting1*(waiting==1) + b_lrt_waiting2*(waiting==2) + b_lrt_transfer*transfer + b_age1*(age==1) + b_age2*(age==2) + b_income1*(income==1) + b_income2*(income==2) + b_veh_av*veh_av + b_car_av*car_av + b_work*work + b_gender*gender + b_ctc*(tripchain==2) 
+   V[['nonlrt_stc']] = asc_nonlrt_stc  + b_nonlrt_cost1*(cost==1) + b_nonlrt_cost2*(cost==2) + b_nonlrt_cost3*(cost==3) + b_nonlrt_time1*(time==1) + b_nonlrt_time2*(time==2) + b_nonlrt_waiting1*(waiting==1) + b_nonlrt_waiting2*(waiting==2) + b_nonlrt_transfer*transfer 
+   V[['nonlrt_ctc']] = asc_nonlrt_ctc  + b_nonlrt_cost1*(cost==1) + b_nonlrt_cost2*(cost==2) + b_nonlrt_cost3*(cost==3) + b_nonlrt_time1*(time==1) + b_nonlrt_time2*(time==2) + b_nonlrt_waiting1*(waiting==1) + b_nonlrt_waiting2*(waiting==2) + b_nonlrt_transfer*transfer 
+   
+   ### Specify nests for NL model
+   nlNests      = list(root=1, LRT=lambda_LRT, nonLRT=lambda_nonLRT)
+   
+   ### Specify tree structure for NL model
+   nlStructure= list()
+   nlStructure[["root"]]   = c("LRT","nonLRT")
+   nlStructure[["LRT"]]    = c("lrt_stc","lrt_ctc")
+   nlStructure[["nonLRT"]] = c("nonlrt_stc", "nonlrt_ctc")
+   
+   ### Define settings for NL model
+   nl_settings <- list(
+     alternatives = c(lrt_stc=1, lrt_ctc=2, nonlrt_stc=3, nonlrt_ctc=4),
+     avail        = list(lrt_stc=av_alt1, lrt_ctc=av_alt2, nonlrt_stc=av_alt3, nonlrt_ctc=av_alt4),
+     choiceVar    = choice,
+     V            = V,
+     nlNests      = nlNests,
+     nlStructure  = nlStructure
+   )
+   
+   ### Compute probabilities using NL model
+   P[["model"]] = apollo_nl(nl_settings, functionality)
+   
+   ### Take product across observation for same individual
+   P = apollo_panelProd(P, apollo_inputs, functionality)
+   
+   ### Prepare and return outputs of function
+   P = apollo_prepareProb(P, apollo_inputs, functionality)
+   return(P)
+ }
> # ################################################################# #
> #### MODEL ESTIMATION                                            ####
> # ################################################################# #
> 
> model = apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs)

Testing likelihood function...

Overview of choices for NL model component :
                                 lrt_stc lrt_ctc nonlrt_stc nonlrt_ctc
Times available                   858.00 2112.00     858.00    2112.00
Times chosen                      345.00  955.00     513.00    1157.00
Percentage chosen overall          11.62   32.15      17.27      38.96
Percentage chosen when available   40.21   45.22      59.79      54.78

Nesting structure for NL model component :
Nest: root (1)
|-Nest: LRT (0.5)
|  |-Alternative: lrt_stc
|  '-Alternative: lrt_ctc
'-Nest: nonLRT (0.5)
   |-Alternative: nonlrt_stc
   '-Alternative: nonlrt_ctc

Pre-processing likelihood function...

Testing influence of parameters............................[color=#FF0000]Error in apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities,  : 
  Parameter lambda_nonLRT does not influence the log-likelihood of your model![/color]
> 
> # ################################################################# #
> #### MODEL OUTPUTS                                               ####
> # ################################################################# #
> 
> # ----------------------------------------------------------------- #
> #---- FORMATTED OUTPUT (TO SCREEN)                               ----
> # ----------------------------------------------------------------- #
> 
> apollo_modelOutput(model)
Error in apollo_modelOutput(model) : object 'model' not found
> 
> # ----------------------------------------------------------------- #
> #---- FORMATTED OUTPUT (TO FILE, using model name)               ----
> # ----------------------------------------------------------------- #
> 
> apollo_saveOutput(model)
Error in apollo_saveOutput(model) : object 'model' not found
> 
> # ################################################################# #
> ##### POST-PROCESSING                                            ####
> # ################################################################# #
> 
> ### Print outputs of additional diagnostics to new output file (remember to close file writing when complete)
> sink(paste(model$apollo_control$modelName,"_additional_output.txt",sep=""),split=TRUE)
Error in paste(model$apollo_control$modelName, "_additional_output.txt",  : 
  object 'model' not found
> 
> # ----------------------------------------------------------------- #
> #---- LR TEST AGAINST MNL MODEL                                  ----
> # ----------------------------------------------------------------- #
> 
> apollo_lrTest("Apollo_MNL_example", "Apollo_NL_example")
Error in apollo_lrTest("Apollo_MNL_example", "Apollo_NL_example") : 
  File Apollo_MNL_example_output.txt not found!
> apollo_lrTest("Apollo_MNL_example", model)
Error in apollo_lrTest("Apollo_MNL_example", model) : 
  object 'model' not found
> 
> # ----------------------------------------------------------------- #
> #---- switch off writing to file                                 ----
> # ----------------------------------------------------------------- #
> 
> if(sink.number()>0) sink()
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Error in testing influence of parameters of Nested Logit Model

Post by stephanehess »

Hi

are the single and complex trip chain both available at the same time?

Stephane
--------------------------------
Stephane Hess
www.stephanehess.me.uk
fazafawzan
Posts: 3
Joined: 10 Mar 2021, 05:31

Re: Error in testing influence of parameters of Nested Logit Model

Post by fazafawzan »

Dear Prof. Stephane,

Both the single and complex trip chain are not available at the same time since each respondent stated their type of trip for every choice/alternative, either single trip chain (stc) or complex trip chain (ctc).
stephanehess
Site Admin
Posts: 974
Joined: 24 Apr 2020, 16:29

Re: Error in testing influence of parameters of Nested Logit Model

Post by stephanehess »

Hi

if there is only ever one alternative available in a nest at one time, you cannot estimate the nesting parameter

Best wishes

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