forestSummarize {NMsim}R Documentation

Summarize simulated exposures relative to reference subject

Description

Summarize simulated exposures relative to reference subject

Usage

forestSummarize(data, funs.exposure, cover.ci = 0.95, by, as.fun)

Arguments

data

Simulated data to process. This data.frame must contain must contain multiple columns, as defined by 'NMsim::forestDefineCovs()'.

funs.exposure

A named list of functions to apply for derivation of exposure metrics.

cover.ci

The coverage of the confidence intervals. Default is 0.95.

by

a character vector of column names to perform all calculations by. This could be sampling subsets or analyte.

as.fun

The default is to return data as a 'data.frame'. Pass a function (say 'tibble::as_tibble') in as.fun to convert to something else. If data.tables are wanted, use 'as.fun="data.table"'. The default can be configured using 'NMdataConf()'.

Details

This function is part of the workflow provided by NMsim to generate forest plots - a graphical representation of the estimated covariate effects and the uncertainty of those effect estimates. 'forestDefineCovs()' helps construct a set of simulations to perform, simulation methods like 'NMsim_VarCov' and 'NMsim_NWPRI' can perform siulations with parameter uncertainty, and 'forestSummarize()' can then summarize those simulation results into the numbers to plot in a forest plot. See the NMsim vignette on forest plot generation available on the NMsim website for a step-by-step demonstration.

The following columns are generated by 'forestDefineCovs()' and are expected to be present. Differences within any of them will lead to separate summarizing (say for as covariate value to be plotted):

Value

A data.frame


[Package NMsim version 0.2.4 Index]