Page 1 of 1

Post-estimation on an old model

Posted: 26 Jul 2023, 11:58
by NimaDadashzadeh
Hi Stephane

My computer restarted while the code was running (if I am not wrong, it was in the mid of post-estimation).
I have a .rds file of my MMNL model. I successfully load it and I would like to continue with that.
There is no clear instruction (step-by-step) in the Manual on how post-estimation can be done using an old model. I was wondering if you could advise on this case.

Below are the old model details:

Successfully loaded C:/..../output/MMNL_CS_uniform_STUDENT_model.rds

Model name : MMNL_CS_uniform_STUDENT
Model description : MMNL model with Uniform distributions for all parameters, cross-sectional spec
Model run at : 2023-07-25 23:12:08
Estimation method : bfgs
Model diagnosis : successful convergence
Number of individuals : 1251
Number of rows in database : 14837
Number of modelled outcomes : 14837

Number of cores used : 7
Number of inter-individual draws : 500 (mlhs)

LL(start) : -45629.6
LL (whole model) at equal shares, LL(0) : -20544.88
LL (whole model) at observed shares, LL(C) : Not applicable
LL(final, whole model) : -16284.3
Rho-squared vs equal shares : 0.2074
Adj.Rho-squared vs equal shares : 0.2048
Rho-squared vs observed shares : Not applicable
Adj.Rho-squared vs observed shares : Not applicable
AIC : 32672.6
BIC : 33032.12

Estimated parameters : 52 # (I just put the results of some parameters below)
Time taken (hh:mm:ss) : 06:27:47.68
pre-estimation : 01:31:34.16
estimation : 04:53:13.13
initial estimation : 04:46:33.95
estimation after rescaling : 00:06:39.17
post-estimation : NA:NA:NA
Iterations : 62
initial estimation : 61
estimation after rescaling : 1

Unconstrained optimisation.

Estimates:
Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0)
asc_None 0.00000 NA NA NA NA
asc_Walk 3.49646 NA NA NA NA
asc_Bike 5.13577 NA NA NA NA
asc_Car 2.29420 NA NA NA NA
asc_Car_shift_STUDENT -0.74212 NA NA NA NA
b_tt_Walk_a -4.40409 NA NA NA NA
b_tt_Bike_a -0.14448 NA NA NA NA
b_tt_Car_a -5.46801 NA NA NA NA
b_tt_Car_STUDENT_a -10.29536 NA NA NA NA
b_tt_CarHire_a -4.30205 NA NA NA NA
b_tt_Bus_a -9.53519 NA NA NA NA
b_tt_Train_a -7.17690 NA NA NA NA
b_tt_Walk_b -6.94532 NA NA NA NA
b_tt_Bike_b -2.92049 NA NA NA NA
b_tt_Car_b -1.31371 NA NA NA NA
b_tt_Car_STUDENT_b -3.89690 NA NA NA NA
b_tt_CarHire_b -0.55396 NA NA NA NA
b_tt_Bus_b -4.48581 NA NA NA NA
b_tt_Train_b -1.91113 NA NA NA NA
b_cost_a -1.93089 NA NA NA NA
b_cost_b -3.35786 NA NA NA NA
mu_shortDis 1.00000 NA NA NA NA # to capture the heteroskedasticity of short and long journeys
mu_longDis 0.18508 NA NA NA NA # to capture the heteroskedasticity of short and long journeys

Re: Post-estimation on an old model

Posted: 10 Aug 2023, 09:57
by stephanehess
Hi

after you use apollo_loadModel, the steps are exactly the same as if you had just estimated the model. So I'm not sure about your question, can you explain where the issue is and I can help

Stephane

Re: Post-estimation on an old model

Posted: 11 Aug 2023, 10:19
by NimaDadashzadeh
Dear Stephane,

Thank you for your reply. So, my computer was restarted when the code was in the stage of "post estimation 10%....20%....".
The question is shall I recall the old model using apollo_loadModel and then run the sentence below only ?

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

Re: Post-estimation on an old model

Posted: 14 Aug 2023, 07:10
by stephanehess
Hi

what you can do is to use apollo_loadModel just before the call to apollo_estimate, and then use:

Code: Select all

model = apollo_estimate(model$estimate, apollo_fixed, apollo_probabilities, apollo_inputs, estimate_settings)
instead of

Code: Select all

model = apollo_estimate(apollo_beta, apollo_fixed, apollo_probabilities, apollo_inputs, estimate_settings)
that way, the results will be used as starting values

Stephane