xlogit
xlogit copied to clipboard
Extract individual-level estimates
Is there a way to extract the individual-level estimates after fitting a Mixed Logit model? The model.summary() command only gives the mean and standard deviations of the estimates, but I would like to extract the indivuidual-level estimates.
I want to assess parameter recovery of the Mixed Logit model, but I cannot figure out how to get the estimated individual parameters. Thanks in advance! :)
I am using this code:
varnames = ["P1_2", "P1_3", "P2_2", "P3_2", "P3_3", "no_choice"]'
model = MixedLogit()
panels = data['respID'].values
model.fit(X=data[varnames], y=data['choice'], varnames = varnames,
ids = data['obsID'], panels = panels,
alts = data['altID'], n_draws = 10,
randvars = {'P1_2': 'n',
'P1_3': 'n',
'P2_2': 'n',
'P3_2': 'n',
'P3_3': 'n',
'no_choice': 'n'},
optim_method='L-BFGS-B')
model.summary()