EpiCompare

general package information

EpiCompare

EpiCompare: package overview

data

Data included in package

pomp_arr

Example SIR simulation output of class 'array' from the pomp package

pomp_df

Example SIR simulation output of class ' data.frame' from the pomp package

pomp_pomp

Example SIR simulation output of class ' pomp' from the pomp package

pomp_sir

pomp_sir Example output from the pomp package.

EpiModel_agg_bd

EpiModel_agg_bd Example output from the EpiModel package for a individual model with birth and death rates.

EpiModel_det

EpiModel_det Example output from the EpiModel package for a deterministic model

EpiModel_icm

EpiModel_icm Example output from the EpiModel package for a stochastic ICM

hagelloch_agents

Measles in Hagelloch, Germany, 1861 (agent format)

hagelloch_raw hagelloch_raw2 hagelloch_aug_births

Measles in Hagelloch, Germany, 1861

hagelloch_sir

Measles in Hagelloch, Germany, 1861 (SIR format)

agents_sims

agents_sims Example output from SIR simulations

sis_data

Example SIS model of class `dcm` from the EpiModel package.

sis_data_f

Example SIS model converted to aggregate format

fortify

Fortify functions

fortify_aggregate()

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<data.frame>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<dcm>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<epimodel_inner>)

Take EpiModel Data and format it

fortify_aggregate(<icm>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<list>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<netsim>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<pomp>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pompList>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_df>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_df_inner>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_list>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare.

agents to aggregate

Method associated with transforming agents information to aggregations

agents_to_aggregate()

generalized method to convert raw agent based data to aggregate data

agents_to_aggregate(<data.frame>)

generalized function to convert raw agent based data to aggregate data

agents_to_aggregate(<grouped_df>)

generalized function to convert raw agent based data to aggregate data for grouped_data (preforms per group)

geoms and stats

forward facing geoms & stats (and one theme)

stat_prediction_band() geom_prediction_band()

The prediction_band geom/stat

geom_aggregate() stat_aggregate()

aggregate SIR path visuals from agent data

theme_sir()

Add a portable theme for SIR ternary plots

convex hull and delta ball tools

Forward facing functions associated with convex hull and delta-ball covering relative to creating a prediction band. This can be used for any dimensional model.

contained()

Method to check if a filament is completely contained in a set (relative to discrete representation)

create_convex_hull_structure()

create the convex hull associated with points

create_delta_ball_structure()

create the delta ball associated with points

grab_top_depth_filaments()

Select a proportion of the top / most deep filaments

print(<ggplot>)

Explicitly draw plot (ggtern and ggplot2 compatible)

print(<tidy_dist_mat>)

print tidy_dist_mat objects

geometry structure & depth

internal and semi-internal

simplex_project_mat()

Create linear map to move simplex with p vertices to p-1 dimensional space

to_lower_simplex()

move df to simplex representation

distance_depth_function()

Geenens & Nieto-Reyes functional distance-based depth

as.matrix(<tidy_dist_mat>) as.array(<tidy_dist_mat>)

convert tidy_dist_mat to matrix

check_dist_params()

checks the provided dist_params to make sure they are what is expected

check_tidy_dist_mat_dimensions()

check_tidy_dist_mat_dimensions

check_tidy_dist_names_distinct()

check_tidy_dist_names_distinct

`colnames<-`(<tidy_dist_mat>)

assign colnames

compare_new_to_rest_via_distance()

Title

`dimnames<-`(<tidy_dist_mat>)

assign dimnames for tidy_dist_mat

dimnames(<tidy_dist_mat>)

return dimnames for tidy_dist_mat

dist_along_path_angle()

Distance/angle between points along path relative to eculidean distance (2d path)

dist_along_path_direction()

Distance/direction between points along path relative to eculidean distance

dist_between_paths()

Distance between points

dist_matrix_innersq_2d() dist_matrix_innersq_angle()

Calculates the distance matrix between a set of paths (Euclidean based). This is actually d^2 (2d)

dist_matrix_innersq_direction()

Calculates the distance matrix between a set of paths (Euclidean based). This is actually d^2

distance_psuedo_density_function()

psuedo-density for objects with a distance between them

distanglepath_df()

Distance/direction between points along path relative to eculidean distance

distinct_time()

select distinct rows (relative to time)

equa_dist_points_angle()

point compression (2d)

equa_dist_points_direction()

point compression

equa_dist_points_listable_angle()

List of compressions (2d)

equa_dist_points_listable_direction()

List of compressions

filament_distance_depth()

Calculate filament depth (relative to distance depth)

format(<tidy_dist_mat>)

Format tidy_dist_mat for printing

hausdorff_dist()

Calculates the Hausdorff distance between 2 sets

head(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

is.tidy_dist_mat()

checks if object is a tidy_dist_mat

l2filamentdist_df()

inner l2 distance between filaments

local_distance_depth_function()

Localized version of Geenens & Nieto-Reyes functional distance-based depth

print(<tidy_dist_mat>)

print tidy_dist_mat objects

`rownames<-`(<tidy_dist_mat>)

assign rownames for tidy_dist_mat

`[`(<tidy_dist_mat>)

Extract a part of a tidy_dist_mat object

tail(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

tidy_dist_mat()

tidy_dist_mat objects

which_index() which_not_index()

find the index of a tidy_dist_mat relative to a data.frame

step_along_angle()

step along 2d path with angle

step_along_direction()

step along path with direction

steps_along_2d_line()

Create n equidistance points

project_onto_simplex()

Project onto a simplex where observations in the unit simplex x

project_to_simplex()

project onto a standard 3d simplex.

special functions

special (internal) functions that make the package work

imports_hidden_from()

import hidden function / variable from other package

update_approved_layers()

Updates approved layers of ggtern

r_new_interface()

logic to check if R is >= 4

print(<ggplot>)

Explicitly draw plot (ggtern and ggplot2 compatible)

tidy_dist_mat

tidy_dist_mat object and associated functions

as.matrix(<tidy_dist_mat>) as.array(<tidy_dist_mat>)

convert tidy_dist_mat to matrix

check_tidy_dist_mat_dimensions()

check_tidy_dist_mat_dimensions

`colnames<-`(<tidy_dist_mat>)

assign colnames

`dimnames<-`(<tidy_dist_mat>)

assign dimnames for tidy_dist_mat

dimnames(<tidy_dist_mat>)

return dimnames for tidy_dist_mat

distance_depth_function()

Geenens & Nieto-Reyes functional distance-based depth

distance_psuedo_density_function()

psuedo-density for objects with a distance between them

format(<tidy_dist_mat>)

Format tidy_dist_mat for printing

head(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

is.tidy_dist_mat()

checks if object is a tidy_dist_mat

local_distance_depth_function()

Localized version of Geenens & Nieto-Reyes functional distance-based depth

print(<tidy_dist_mat>)

print tidy_dist_mat objects

`rownames<-`(<tidy_dist_mat>)

assign rownames for tidy_dist_mat

`[`(<tidy_dist_mat>)

Extract a part of a tidy_dist_mat object

tail(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

tidy_dist_mat()

tidy_dist_mat objects

which_index() which_not_index()

find the index of a tidy_dist_mat relative to a data.frame

not() is.not_df()

characterizes that we will subset by the indices *not* in said data.frame

reverse_not_df()

removes the not() operation (that makes a df a not_df)

everything

EpiCompare

EpiCompare: package overview

EpiModel_agg_bd

EpiModel_agg_bd Example output from the EpiModel package for a individual model with birth and death rates.

EpiModel_det

EpiModel_det Example output from the EpiModel package for a deterministic model

EpiModel_icm

EpiModel_icm Example output from the EpiModel package for a stochastic ICM

GeomPredBand

GeomPredBand

GeomSirAggregate

GeomSirAggregate

SEIR_to_SIR_E()

Convert SEIR to XYZ coordinates fixed in a tetrahedron

SEIR_to_XYZ()

Convert SEIR to XYZ coordinates fixed in a tetrahedron

StatSirAggregate

StatSirAggregate

StatPredBandConvexHull

stat object for use in convex hull based stat_prediction_band and geom_prediction_band

StatPredBandDeltaBall

stat object for use in delta_ball based stat_prediction_band and geom_prediction_band

StatPredBandKDE

stat object for use in kde based stat_prediction_band and geom_prediction_band

StatPredBandSpherical

stat object for use in spherical ball based stat_prediction_band and geom_prediction_band

agent_array_to_df()

Put agent_array into a data frame format

agent_array_to_mat()

Put agent_array into a matrix format

agents_sims

agents_sims Example output from SIR simulations

agents_to_aggregate()

generalized method to convert raw agent based data to aggregate data

agents_to_aggregate(<data.frame>)

generalized function to convert raw agent based data to aggregate data

agents_to_aggregate(<grouped_df>)

generalized function to convert raw agent based data to aggregate data for grouped_data (preforms per group)

arrangeGrob() grid.arrange()

Arrange multiple grobs on a page (ggtern and ggplot2 compatible)

as.matrix(<tidy_dist_mat>) as.array(<tidy_dist_mat>)

convert tidy_dist_mat to matrix

cases_to_SIR()

Impute Recovered counts for the SIR model

cases_to_SIR(<data.frame>)

Impute Recovered counts for the SIR model

cases_to_SIR(<grouped_df>)

Impute Recovered counts for the SIR model

check_character_percent()

check if a character is a desirable percentage value

check_dist_params()

checks the provided dist_params to make sure they are what is expected

check_inside_elipsoid()

assert if observation is inside elipsoid

check_inside_elipsoid_func()

create a function assert if observations are inside elipsoid

check_min_max_time()

min_max_time vector check

check_ordered()

checks if states within data frame are ordered as inputted (<=)

check_tidy_dist_mat_dimensions()

check_tidy_dist_mat_dimensions

check_tidy_dist_names_distinct()

check_tidy_dist_names_distinct

`colnames<-`(<tidy_dist_mat>)

assign colnames

compare_new_to_rest_via_distance()

Title

contained()

Method to check if a filament is completely contained in a set (relative to discrete representation)

convex_hull_compute_group_paths_to_points()

convex hull function for compute_group ggplot object (for top paths' points)

create_convex_hull_structure()

create the convex hull associated with points

create_delta_ball_structure()

create the delta ball associated with points

delta_ball_compute_group_paths_to_points()

delta ball function for compute_group ggplot object (for top paths' points)

delta_structure()

Performs delta ball approach (2d approach)

`dimnames<-`(<tidy_dist_mat>)

assign dimnames for tidy_dist_mat

dimnames(<tidy_dist_mat>)

return dimnames for tidy_dist_mat

dist_along_path_angle()

Distance/angle between points along path relative to eculidean distance (2d path)

dist_along_path_direction()

Distance/direction between points along path relative to eculidean distance

dist_between_paths()

Distance between points

dist_matrix_innersq_2d() dist_matrix_innersq_angle()

Calculates the distance matrix between a set of paths (Euclidean based). This is actually d^2 (2d)

dist_matrix_innersq_direction()

Calculates the distance matrix between a set of paths (Euclidean based). This is actually d^2

distance_depth_function()

Geenens & Nieto-Reyes functional distance-based depth

distance_psuedo_density_function()

psuedo-density for objects with a distance between them

distanglepath_df()

Distance/direction between points along path relative to eculidean distance

distinct_time()

select distinct rows (relative to time)

draws_to_states()

Draw the transfer matrix

equa_dist_points_angle()

point compression (2d)

equa_dist_points_direction()

point compression

equa_dist_points_listable_angle()

List of compressions (2d)

equa_dist_points_listable_direction()

List of compressions

expanding_info()

expanding aggregate data to desirable format

extract_contour()

Selection of specific contour level from KDE object

extract_icm_cols()

Extract the icm class totals

filament_compression()

Compress filaments to filaments with the same number of points (equally linearly space compared to original filament definition)

filament_distance_depth()

Calculate filament depth (relative to distance depth)

fit_kde_object()

Fit kernel density estimator (KDE) object

format(<tidy_dist_mat>)

Format tidy_dist_mat for printing

fortify_aggregate()

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<data.frame>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<dcm>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<epimodel_inner>)

Take EpiModel Data and format it

fortify_aggregate(<icm>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<list>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<netsim>)

Take external aggregate data and put it in a format used in this package

fortify_aggregate(<pomp>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pompList>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_df>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_df_inner>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare

fortify_aggregate(<pomp_list>)

Takes in data from the R pomp package where the output is a data frame and puts it in SIR format for EpiCompare.

stat_prediction_band() geom_prediction_band()

The prediction_band geom/stat

get_closest()

create a grid of points indicating near border or not (and inside or outside)

get_closest_nn()

create a grid of points indicating near border or not (and inside or outside) using RANN::nn2.

get_delta()

Find delta for covering

get_delta_nn()

calculate maxmin distance between points

get_epimodel_icm_states()

Get the viable names for the states from an icm object

get_grid_elipsoid_containment()

create a grid of points indicating whether in a set of 2d elipsoids

get_lines()

Get edges within union of balls

get_previous_counts()

Count number in each state

get_state_names()

Get the state names fro the transition matrix

get_tri_matrix()

Make triangle matrix

get_xy_coord()

get xy ternary coordinates from xyz based data frame

grab_top_depth_filaments()

Select a proportion of the top / most deep filaments

hagelloch_agents

Measles in Hagelloch, Germany, 1861 (agent format)

hagelloch_raw hagelloch_raw2 hagelloch_aug_births

Measles in Hagelloch, Germany, 1861

hagelloch_sir

Measles in Hagelloch, Germany, 1861 (SIR format)

hausdorff_dist()

Calculates the Hausdorff distance between 2 sets

head(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

imports_hidden_from()

import hidden function / variable from other package

initialize_agent_array()

Initialize array for agent simulations

inner_compute_group_paths_to_points()

inner function to compute points of top paths

inner_delta_ball_wrapper()

Run delta ball analysis

is.tidy_dist_mat()

checks if object is a tidy_dist_mat

is.wholenumber()

Check for whole number values

kde_from_list()

Contour of data points using Kernel Density Estimate.

l2filamentdist_df()

inner l2 distance between filaments

local_distance_depth_function()

Localized version of Geenens & Nieto-Reyes functional distance-based depth

multinomial_updater()

Multinomial draws to update states depending on past count

not() is.not_df()

characterizes that we will subset by the indices *not* in said data.frame

pomp_arr

Example SIR simulation output of class 'array' from the pomp package

pomp_df

Example SIR simulation output of class ' data.frame' from the pomp package

pomp_pomp

Example SIR simulation output of class ' pomp' from the pomp package

pomp_sir

pomp_sir Example output from the pomp package.

print(<ggplot>)

Explicitly draw plot (ggtern and ggplot2 compatible)

print(<tidy_dist_mat>)

print tidy_dist_mat objects

process_df_index()

internal function to get the indices of the tidy_dist_mat related to a data frame.

project_onto_simplex()

Project onto a simplex where observations in the unit simplex x

project_to_simplex()

project onto a standard 3d simplex.

quantile_curves_to_points()

Pull top (1-alpha)% quantile percent of curves points.

r_new_interface()

logic to check if R is >= 4

remove_delta_off_line()

Shorten line by delta on both sides

remove_incomplete_tri()

Remove triangles with edges that need removal

reverse_not_df()

removes the not() operation (that makes a df a not_df)

`rownames<-`(<tidy_dist_mat>)

assign rownames for tidy_dist_mat

sim_arr_to_df()

Convert simulation output from simulate_SIR_agents to data frame format

simplex_project_mat()

Create linear map to move simplex with p vertices to p-1 dimensional space

simulate_SIR_agents()

Simulate SIR data according to a chain Binomial

simulate_agents()

Simulate an agent-based model for given state-to-state transfers

sirs_data

Example of SIRS model generated from the pomp package.

sis_data

Example SIS model of class `dcm` from the EpiModel package.

sis_data_f

Example SIS model converted to aggregate format

geom_aggregate() stat_aggregate()

aggregate SIR path visuals from agent data

state_change_inds()

Determine which agents changed states

step_along_angle()

step along 2d path with angle

step_along_direction()

step along path with direction

steps_along_2d_line()

Create n equidistance points

`[`(<tidy_dist_mat>)

Extract a part of a tidy_dist_mat object

tail(<tidy_dist_mat>)

Return the Last Parts of a tidy_dist_mat (symmetric grab)

theme_sir()

Add a portable theme for SIR ternary plots

tidy_dist_mat()

tidy_dist_mat objects

to_lower_simplex()

move df to simplex representation

top_curves_to_points()

Pull the points from the top (1-alpha)% percent of curves.

top_curves_to_points(<grouped_df>)

Pull the points from the top (1-alpha)% percent of curves (LIST)

top_curves_to_points(<list>)

Pull the points from the top (1-alpha)% percent of curves (LIST)

trans_mat_to_D_fxn()

Take a character formula transition matrix and turn it into a function

update_agents()

Update agents based on Bernoulli draws

update_approved_layers()

Updates approved layers of ggtern

which_index() which_not_index()

find the index of a tidy_dist_mat relative to a data.frame