mean_beta: Average Estimated Coefficient

Description Usage Arguments Value Examples

View source: R/assess_performance.R

Description

This function gives the mean value of the estimated log relative risks (\hat{β}s) and the mean of the estimated relative risk values over the n simulations.

Usage

1

Arguments

df

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

Value

A data frame with the mean estimated log relative risk and mean estimated relative risk. The mean estimated risk is based on first calculating the mean log relative risk and then exponentiating this mean value.

Examples

1
2
3
4
5
6
7
sims <- create_sims(n_reps=10, n=50, central = 100, sd = 10,
            exposure_type="continuous", exposure_trend = "cos1",
            exposure_amp = .6, average_outcome = 22,
            outcome_trend = "no trend", outcome_amp = .6, rr = 1.01)
fits <- fit_mods(data = sims, custom_model = spline_mod,
                 custom_model_args = list(df_year = 1))
mean_beta(df=fits)

eesim documentation built on May 2, 2019, 7:30 a.m.