This function takes in the meta-data and calculates an appropriate p-value
calculate_pvalue(data, variable, by, test, type, id)
input data set
categorical or continuous variable for which a test with by_var
is desired
categorical variable
list of statistical tests from meta data
the type of variable, one of categorical or continuous, from the metadata
the id variable for clustered data
a table of p-values for each variable