circ_compare_groups {card} | R Documentation |
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 |
time |
Name of the time-dependent variable, usually hours |
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.
Value
Returns a dataframe that has the time variable, the categorical variable, and the statistics (including p-value) of the continuous variable
Examples
data("twins")
circ_compare_groups(data = twins, x = "rDYX", y = "sad_cat", time = "hour")