knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)

Overview

blah blah blah ...

Setup

# Load wave -----------------------------------------------------------------------------
library(wave)

# Load other packages needed for this vignette ------------------------------------------

Run program

Read in parameter input file

# read parameters from input files ------------------------------------------------------
params <- readParams()
# user can specify the folder and file names of the input file within the ""
# if no path is specified a window will pop up and allow user to choose a file from your computer

Run simulation

# run simulation -----------------------------------------------------------------------
outcomes_dat <- run_simvee(params)
#   there is an optional path argument for run_simvee(params, path = )
#   if no path is specified, it will default to current working directory
#   this outputs the outcomes files specified in the params file

Apply VE estimation methods

# rather re-run the simulation program, user can read in outcomes file
# you can specify the file name/path of the output file inside ""
# outcomes_dat <- read.csv(file.choose())

# add FARI indicator variable ----------------------------------------------------------
outcomes_dat <- outcomes_dat %>% mutate(FARI = ifelse(DINF == 0, 0, 1),
                                        DINF_new = ifelse(DINF == 0, 999, DINF))

# apply VE estimation methods ----------------------------------------------------------
ve_estimates <- estimate_ve(dat = outcomes_dat, params)

# print proportion of null hypotheses rejected -----------------------------------------
ve_estimates$prop_reject_h0

# print mean mle parameter estimates ---------------------------------------------------
ve_estimates$mean_mle_params


fluvee/wave documentation built on Nov. 9, 2023, 12:31 p.m.