Skip to content

Commit

Permalink
Finished LPR vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jun 18, 2024
1 parent 0e86108 commit 3c6e73d
Show file tree
Hide file tree
Showing 3 changed files with 711 additions and 82 deletions.
7 changes: 5 additions & 2 deletions src/bmdrc/model_fitting.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,11 @@ def check_remaining_models(potential_models):
model_results[endpoint] = [p_values, models[potential_models[0]], potential_models[0], aics, bmd10s, bmdls]
else:
bmdls2 = [x for x in potential_models if np.isnan(bmdls[x]) == False]
bmdls2_data = [bmdls[x] for x in potential_models if np.isnan(bmdls[x]) == False]
selected_model = bmdls2[np.argmin(bmdls2_data)]
if len(bmdls2) == 0:
selected_model = aics2[np.argmin(aics2_data)]
else:
bmdls2_data = [bmdls[x] for x in potential_models if np.isnan(bmdls[x]) == False]
selected_model = bmdls2[np.argmin(bmdls2_data)]
model_results[endpoint] = [p_values, models[selected_model], selected_model, aics, bmd10s, bmdls]

self.model_fits = model_results
Expand Down
Loading

0 comments on commit 3c6e73d

Please sign in to comment.