xlogit icon indicating copy to clipboard operation
xlogit copied to clipboard

Extract individual-level estimates

Open 694411 opened this issue 3 months ago • 2 comments

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()

694411 avatar Nov 28 '24 11:11 694411