GHRmodel reference
GHRmodel-package: Supports modeling health outcomes using Bayesian hierarchical spatio-temporal models with complex covariate effects (e.as_GHRformulas: This function converts a character vector of suitable R-INLA formulas into a structured GHRformulas object.cov_add: This function appends one or more covariate names to all elements (i.cov_interact: This function generates interaction terms between covariates specified in the pattern or name arguments.cov_multi: This function generates all possible combinations of covariates by selecting one variable from each user-defined group.cov_nl: This function transforms selected covariates identified by pattern or name into non-linear terms using INLA’s f() syntax.cov_uni: This function returns a list where each element contains a single covariate, based on covariates specified in the pattern or name arguments.cov_varying: This function transforms covariates identified by pattern or name into varying effect terms of the form: f(unit, covariate, model = ‘iid’, constr = FALSE) , which allows covariates to have varying slopes across spatial or temporal units.crossbasis_inla: This function is a wrapper around dlnm::crossbasis to generate cross-basis matrices that capture nonlinear effects of a predictor across both exposure and lag dimensions.crosspred_inla: This function takes an object of class GHRmodels , extracts the relevant coefficients and variance-covariance matrix, and then calls dlnm::crosspred to compute predictions over a range of covariate values (or at specified points).crps_empirical: Computes the CRPS for a single observation given a set of posterior predictive draws, using the empirical (energy form) estimator = {i=1}^n |x_i - y| - {i=1}^n _{j=1}^n |x_i - x_j| where y is the observed value and x_1, , x_n are the posterior predictive draws.dengue_MS: The dengue_MS example data set contains monthly counts of notified dengue cases by microregion, along with a range of spatial and spatiotemporal covariates (e.dengue_SP: The dengue_SP example data set reports the weekly number of notified dengue cases in the municipality of São Paulo together with climatic covariates.extract_names: This function allows the user to select variables from a data set by prefix (using the pattern argument) or by exact name matching.fit_models: This function fits a set of INLA model formulas, provided in a GHRformulas object, to a specified dataset.get_covariates: Extracts covariates from a GHRmodels object and returns them as a list of character vectors.lag_cov: This function creates lagged versions of one or more numeric or categorical variables in an equally spaced time-series data set.map_MS: Administrative boundaries (polygon geometries) of the 11 municipalities in Mato Grosso do Sul (Brazil) to be used with the dengue_MS data set.onebasis_inla: This function is a wrapper around onebasis to create a one-dimensional basis for spline modeling.plot_coef_crosspred: Generate plots from a “crosspred” object.plot_coef_lin: This function extracts fixed-effect coefficients from a specified model in models , filters them by name or interaction pattern, and produces a forest plot (point estimates with error bars).plot_coef_nl: Generates plots of nonlinear effects from one or more fitted models contained within a GHRmodels object.plot_coef_varying: Generates a forest plot for a specified spatially or temporally varying coefficient (i.plot_fit: This function creates a time series plot comparing observed cases with fitted values (i.plot_gof: Provides visualization of model performance using selected goodness-of-fit (GoF) metrics for one or more models.plot_ppd: This function draws kernel-density curves for posterior-predictive samples and observed data using ggplot2::geom_line() .plot_re: Generates plots of random effects from one or more fitted models contained within a GHRmodels object.predict_models: This function is a simplified version of fit_models that only keeps predictions for the input data and accepts formula strings with different random effects.print.GHRmodels: Generic print function for objects of class GHRmodels .rank_models: This function ranks fitted models in a GHRmodels object by a chosen metric (e.select_fe: Performs a two-stage fixed effect model selection:Best configuration: Fits, ranks and selects univariable fixed effect models by covariate (rolling averages, lags, non-linear) according to goodness of fit metrics.
select_re: Performs a two-stage random effect model selection:Best configuration: Fits, ranks and select univariable random effect models by effect type (spatial, seasonal, interannual) according to goodness of fit metrics.
select_report: Generates reports of the semi-automatic model selection carried out by select_re or select_fe .stack_models: This function stack together two or more objects GHRmodels object, returning one GHRmodels object that contains all the input models.subset_models: This function subsets selected models from a GHRmodels object into a new reduced GHRmodels object.write_inla_formulas: This function streamlines the creation of INLA-compatible model formulas by automatically structuring fixed effects, random effects, and interactions.