IncidenceRS2014: Compute Incidence using rs2014 method Active participants are...

IncidenceRS2014R Documentation

Compute Incidence using rs2014 method Active participants are selected using a set of rules

Description

Compute Incidence using rs2014 method Active participants are selected using a set of rules

Compute Incidence using rs2014 method Active participants are selected using a set of rules

Details

Parameters:

ignore.first.delay

Number of days form his first survey befotre to include a participant (not compatible with ignore.first)

ignore.first.only.new

Ignore first rule only for new participant (uses intake$first.season column @see load_results_for_incidence)

exclude.same

should exclude syndrom if same episode is on (partcipant still active)

exclude.same.delay

max delay to exclude syndrom if same (not excluded if over this delay)

active.max.freq

max delay between 2 surveys (in weeks)

active.week.before

Number of week before each computed week to count active participants

active.week.after

Number of week after each computed week to count active participants

active.min.surveys

min number of surveys for each participant (not active if less)

Input: Input data are expected to have some columns & some fixes. They are loaded and prepared using load_results_for_incidence

Output: Incidence estimator can output several kind of datasets

inc

inc=incidence at (national level)

zlow

"lower geographic level (z)", if estimator is stratified by geographic level

age

"age" age-specific incidence, age categories should be in "age.cat" column in intake data

count

raw count of syndromes used for each syndrom by week, before incidence is computed

Apply the full algorithm for rs2014 incidence computation

Public fields

weekly

Weekly data

intake

Intake data, used to build strata

participant

A data.frame() with all available participants and commputed criterias used during computation

params

Parameters for computation

syndromes

Character vector of column names containing syndromes classification for each weekly

profiler

Time Profiler

verbose

logical produce verbose output if TRUE

design

design stratification from design_incidence

output

vector of character (see Details outupus)

Methods

Public methods


Method new()

instanciate object

Usage
IncidenceRS2014$new(
  weekly,
  intake,
  params,
  syndromes,
  design,
  output = c("inc", "zlow", "age"),
  syndroms = NULL
)
Arguments
weekly

data

intake

intake data

params

list of parameters for computing

syndromes

syndromes column names in weekly

design

design_incidence

output

list of output types to compute

syndroms

compatibility


Method prepare()

Prepare data for incidence computation with RS2014 method

compute first list of participants and filter with some parameters (with constant effects over time)

Internal function Estimate incidence with rs2014 method for a given week

Usage
IncidenceRS2014$prepare()

Method compute_week()

Usage
IncidenceRS2014$compute_week(yw)
Arguments
yw

yearweek number to compute Compute incidence


Method compute()

Usage
IncidenceRS2014$compute(
  weeks = NULL,
  verbose = T,
  progress = F,
  verticalize = FALSE
)
Arguments
weeks

list of weeks to compute, if NULL use all in weekly

verbose

verbose output if TRUE

progress

logical show progress

verticalize

logical produce a verticalized data.frame (one column "syndrome" and type) instead of horizontal one (all syndromes as columns, one row by week)


Method clone()

The objects of this class are cloneable with this method.

Usage
IncidenceRS2014$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


cturbelin/ifnBase documentation built on Aug. 26, 2024, 12:54 p.m.