This function estimates various bionomic parameters (e.g., parous rate, endophagy, endophily, sac rate, and human blood index) for Anopheles mosquitoes at three taxonomic levels: genus, species complex, and species. It fits a hierarchical Bayesian model for each trait using Stan, and merges the results into a single tidy data frame.

Bionomics_For_Anophles_Model()

Value

A `data.frame` containing bionomic estimates for each species or complex, with the following columns:

species_name

Name of the species, complex, or genus (e.g., `"Anopheles gambiae"`, `"Gambiae complex"`, `"GENUS"`).

M, M.sd

Parous rate and its standard deviation.

endophagy, endophagy.sd

Endophagy level and its standard deviation.

endophily, endophily.sd

Endophily level and its standard deviation.

A0, A0.sd

Sac rate and its standard deviation.

Chi

Human blood index (HBI)

Details

Internally, it calls `creation_df()` to prepare input data for each trait, and `run_stan()` to perform Bayesian inference using Stan. The posterior summaries are processed by an internal function to aggregate results across levels and to impute missing species based on known complexes or genus-level data.

The function handles missing data by imputing estimates based on available data at the complex or genus level. It also performs name normalization (e.g., mapping `"Anopheles gambiae s.s."` to `"Anopheles gambiae"` and `"Anopheles gambiae"` to `"Gambiae complex"`). A synthetic `"Jamesii complex"` row is added based on genus-level data.

A side-effect is the use of `print()` statements during model fitting to indicate progress.

Note

This function assumes that `creation_df()` and `run_stan()` are defined in the environment and return appropriately formatted data and model results.