Description Usage Arguments Details Value Examples
View source: R/age_study_period_restrictions.R
Applies age and study period restrictions
| 1 2 | age_study_period_restrictions(data, cases, starting_year, final_year,
  age_min = NULL, age_max = NULL)
 | 
| data | A data.table of electronic medical records (EMRs): the same used in first_case(). | 
| cases | The 3 columns data.table generated with first_case() function. | 
| starting_year | A scalar giving the first year of the study period. | 
| final_year | A scalar giving the last year of the study period. | 
| age_min | A scalar giving the last year of the study period. | 
| age_max | A scalar giving the maximum age for patient inclusion. | 
| final_year | A scalar giving the minimum age for patient inclusion. | 
A patient is included if its age is within the defined range and if one or more diagnoses is identified within the study period (excluding the first two years).
A data.table
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | data(ep)
obj0 <- ep
obj1 <- first_case(
  data = obj0,
  diagnoses_case =  'PE',
  diagnoses_exclusion = 'EXCLUSION',
  exclude_in_case_stay = FALSE,
  n_of_stays_max = 20
)
obj1 
obj2 <- age_study_period_restrictions(
  data = obj0,
  cases = obj1,
  starting_year = 2007,
  final_year = 2013,
  age_min = 0,
  age_max = 120
)
obj2
obj3 <- case_crossover(
  case_stay = obj2,
  data = obj0,
  exposure_diagnoses = '',
  exposure_procedures = 'THR',
  screening_index_stay = FALSE,
  unique_exposure = TRUE,
  interval_length = 42,
  number_of_interval = 8,
  wash_out = 365,
  los_max = 42
)
obj3 
obj3$graph
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.