Should the following function have a beta argument (or a **kwargs) that is passed to self.fl_costs?
|
def loglike(self, params): |
|
""" |
|
The log-likelihood of the Dynamic model is estimated in several steps. |
|
1°) The currenter parameters are supplied to the contraction mapping |
|
function |
|
2°) The function returns a matrix of decision probabilities for each |
|
state. |
|
3°) This matrix is used to compute the loglikelihood of the |
|
observations |
|
4°) The log-likelihood are then summed accross individuals, and |
|
returned |
|
""" |
|
util = self.fl_costs(params, suppr_output=True) |
|
pchoice = self.choice_prob(util) |
|
logprob = np.log(np.dot(pchoice.T, self.state_mat)) |
|
return -np.sum(self.dec_mat*logprob) |
Should the following function have a
betaargument (or a**kwargs) that is passed toself.fl_costs?John-Rust-1987-Python/dynamiclogit.py
Lines 207 to 222 in 2e1a6e1