check_sims {eesim}R Documentation

Assess model performance

Description

Calculates several measures of model performance, based on results of fitting a model to all simulated datasets.

Usage

check_sims(df, true_rr)

Arguments

df

A data frame of replicated simulations which must include a column titled "Estimate" with the effect estimate from the fitted model.

true_rr

The true relative risk used to simulate the data.

Value

A dataframe with one row with model assessment across all simulations. Includes values for:

See Also

The following functions are used to calculate these measurements: beta_bias, beta_var, coverage_beta, mean_beta, power_beta

Examples

sims <- create_sims(n_reps = 100, n = 1000, central = 100,
                    sd = 10, exposure_type = "continuous",
                    exposure_trend = "cos1",
                    exposure_amp = 0.6,
                    average_outcome = 20,
                    outcome_trend = "no trend",
                    rr = 1.02)
fits <- fit_mods(data = sims, custom_model = spline_mod,
                 custom_model_args = list(df_year = 1))
check_sims(df = fits, true_rr = 1.02)


[Package eesim version 0.1.0 Index]