check_covar_validity: Validate prepared covariate data

Description Usage Arguments Value

View source: R/covariate_prep_functions.R

Description

Given prepared covariate data, validate that the correct fields are present and that no data is missing

Usage

1
2
3
4
5
6
7
check_covar_validity(
  prepped_covar,
  covar_name,
  covar_indices,
  model_years,
  location_table
)

Arguments

prepped_covar

data.table containing the prepped covariate

covar_name

Short name for the covariate. This will be used to send the covariate to a particular prep function.

covar_indices

Vector of identifiers that should be used to merge onto the modeling dataset. The prepared covariate dataset should only include identifier columns and the covariate value, specified by the covariate name

model_years

Vector of years to consider for modeling

location_table

Location code merge table for Italy

Value

NULL (fails if there are any issues in prepared covariate data)


njhenry/covidemr documentation built on Feb. 2, 2022, 2:31 a.m.