Skip to content

Commit 91c2030

Browse files
committed
Specified the description of repl_4.
1 parent cff046e commit 91c2030

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

ruspy/estimation/estimation_transitions.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ def estimate_transitions(df, repl_4=False):
1616
:param df: A pandas dataframe, which contains for each observation the Bus ID,
1717
the current state of the bus, the current period and the decision made in this
1818
period.
19-
:param repl_4: Auxiliary variable indicating the complete setting of the
20-
replication of the paper with group 4.
19+
20+
:param repl_4: Auxiliary variable indicating the transition estimation as in Rust
21+
(1987). The treatment of the engine replacement decision for the state
22+
transitions is hardcoded below.
2123
2224
:return: The optimization result of the transition probabilities estimation as a
2325
dictionary.
@@ -61,8 +63,10 @@ def create_increases(
6163
each period the state as an integer.
6264
:param decisions: A two dimensional numpy array containing for each bus in
6365
each period the decision as an integer.
64-
:param repl_4: Auxiliary variable indicating the complete setting of the
65-
replication of the paper with group 4.
66+
67+
:param repl_4: Auxiliary variable indicating the transition estimation as in Rust
68+
(1987). The treatment of the engine replacement decision for the state
69+
transitions is hardcoded below.
6670
6771
:return: A list with the highest increase as maximal index and the increase
6872
counts as entries.
@@ -75,7 +79,7 @@ def create_increases(
7579
state_count[states[bus, period], states[bus, period + 1]] += 1
7680
else:
7781
if repl_4:
78-
increases[bus, period] = 1
82+
increases[bus, period] = 1 # This is the setting from Rust (1987)
7983
else:
8084
increases[bus, period] = states[bus, period + 1]
8185
state_count[0, increases[bus, period]] += 1

0 commit comments

Comments
 (0)