load_results_for_incidence: Load data for incidence computation

View source: R/incidence_data_loader.R

load_results_for_incidenceR Documentation

Load data for incidence computation

Description

This function standardize the loading of data in order to compute incidence

Usage

load_results_for_incidence(
  season,
  age.categories,
  syndrome.from = list(),
  geo = NULL,
  country = NULL,
  first.season = NULL,
  columns = list(),
  onset = NULL,
  verbose = TRUE
)

Arguments

season

season int[1] calc_season

age.categories

int[], breaks to compute age groups

syndrome.from

list() parameters to create the syndrome columns it will be used to call compute_weekly_syndromes

geo

geographic level name to load

country

country to load

first.season

list of first season participants handling parameters (see details)

columns

list() extra columns to load in each survey data (see details)

onset

onset_design quosure expression used to compute onset date, see compute_onset, by default use base_onset_design

verbose

show verbose messages if TRUE

Details

syndrome.from: syndrome parameter will indicate how to create syndrome columns in weekly. A syndrome column is just a logical value column indicating if a weekly survey match a syndrome definition This list will be used as arguments to call compute_weekly_syndromes

first seasons: By default nothing is done on first season. if first season is TRUE, then use the default of all following parameters Otherwise provide a list with these parameters

censored_value

value to put to all participant when season is censored for first participation, default is FALSE

from

From which seasons consider the participation ("previous" or "all"), default is "all"

Columns: Several extra parameters can be provided:

keep.all

if TRUE keep all column in weekly data, if FALSE only keep a restricted list

weekly

Supplementary weekly columns to load see survey_load_results

intake

Supplementary intake columns to load see survey_load_results

use.gender

add gender as supplementary column and recode it

params

list of parameters used as arguments but sometimes completed to an actual version, like onset if null is provided

First season computing:

This feature compute a flag for each participant in the loaded intake indicating if the loaded season is the first participating season of the participant.

In european database all seasons are not available for all countries. In this case a censoring can be applied (considering all participants are not in their first season). A function named 'get_season_censoring(country)' should be available in the platform definition returing for a given country the season until wich data should be censored (if the loaded i season is before or equal to this returned season year, the data will be censored for all participants)

Value

list() with intake, weekly, syndromes (vector of name of syndrome columns)


cturbelin/ifnBase documentation built on Nov. 5, 2023, 12:54 p.m.