File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -541,8 +541,18 @@ def fit_mle(self,
541541 fixed_params .extend (constrained_pos )
542542 final_constrained_pos = sorted (list (set (fixed_params )))
543543
544+
545+ num_nests = len (self .nest_spec ) # Obtain the number of nests
546+ # Set the initial vector of the nest parameters to 40. Note that the 40
547+ # corresponds to scale parameter that is numericalle indistinguishable
548+ # from 1.0
549+ nest_initial_vector = np .ones (num_nests )* 40
550+ initial_parm_vector = np .zeros (init_vals .shape [0 ] - num_nests )
551+
544552 # Create the estimation object
545- zero_vector = np .zeros (init_vals .shape )
553+ zero_vector = np .concatenate ((nest_initial_vector , initial_parm_vector ),
554+ axis = 0 )
555+
546556 estimator_args = [self ,
547557 mapping_res ,
548558 PMLE ,
Original file line number Diff line number Diff line change 2121 # Versions should comply with PEP440. For a discussion on single-sourcing
2222 # the version across setup.py and the project code, see
2323 # https://packaging.python.org/en/latest/single_source_version.html
24- version = '0.1.3 ' ,
24+ version = '0.1.4 ' ,
2525
2626 description = 'Maximum likelihood estimation of conditional logit models \
2727 using Kernel Logistic Regression (KLR)' ,
You can’t perform that action at this time.
0 commit comments