circ_compare_groups: Compare Repeated Measurements by Group
Description
Takes data and returns a summary table of continuous
variable based on a categorical variable. This summary is repeat by
time groups to help describe a circadian pattern.
Usage
circ_compare_groups(data, x, y, time)
Arguments
data
Dataframe containing all the following variables
x
Continuous variable of interest (x ~ y)
y
Grouping variable to apply to the cvar (x ~ y). Must be
binary for t-test, otherwise will return data set without pvalues
time
Name of the time-dependent variable, usually hours
Value
Returns a dataframe that has the time variable, the
categorical variable, and the statistics (including p-value) of the
continuous variable
Details
Applies a simple data transformation to identify the summary
statistics of the data frame by the stated variables. Results in a
mean, standard deviation, and standard error term. This data is
also used for making a t-test based table, which can then also be
graphed in card::ggcircadian.