Study safely

study_safely(ctn, code_names, from, to)

Arguments

code_names

string vector of code_names to be extracted for the study. These are referred to as "bellweather" variables for the study. It is likely that if all variables for a study are used here, that no safe areas will be found. It is better to specify a small number of important variables, that you believe are indicative of overall quality.

from

study starting date

to

study ending date

Value

Details

Interrogates the CC-HIC database and provides a vector of episode ids that can "safely" be used for your study based on the data and date ranges you require. Think of this as an implementation of a venn diagram for data quality This means that these episodes meet the following criteria:

  • Episodes themselves are valid

  • Episodes come from sites that contribute data for the chosen bellweather fields specified in code_names.

  • Episodes come from time period where we know data is being contributed.

  • Events are of good quality during the time period examined

Choosing Bellweather Variables

It is better to select a small number of important variables to code_names. The more variables that are supplied, the lower the likelihood that any "safe" data will be found. The best, and most pragmatic, returns from this function are therefore ones that select a small number (around 10) critical fields that the study would most certainly not be possible without.