This package contains two different implementations for running mixed-effects regression analysis for ground motion prediction models with 2 random effects, event and site.
The only difference between the two implementations is the underlying packages they use.
Install dependencies (see requirements.txt)
This implementation uses R and the R-package lme4 accessed via the python wrapper package pymer4. This implementation is recommended for large datasets with a large number of events/sites as it does not suffer from the statsmodel memory limitation.
Dependencies: See http://eshinjolly.com/pymer4/installation.html for installation
Usage:
import mera
# See docstring for inputs and results
event_res_df, site_res_df, rem_res_df, bias_std_df = mera.run_mera(....)