View source: R/pk_sliding_spline.R
sliding_spliner | R Documentation |
Test for a significant difference in two groups at imputed intervals
Test usage
data |
A dataframe object containing your data. |
category |
The column name of the category to be tested, if present. |
cases |
The column name defining the individual cases, e.g. patients. |
groups |
If more than two groups, the two groups to compare as character vector. |
set_spar |
Set the spar parameter for splines |
cut_low |
Remove low prevalence with fewer than __ data points (default 4) |
test_density |
Minimum density of cases in each group to report p-value (default 3) |
ints |
Number of x intervals over which to measure significance |
quiet |
Silence all text outputs |
x |
The independent variable; is continuous, e.g. time. |
y |
The dependent variable; is continuous, e.g. temperature. |
The data object needs to be organized with each observation as a row, and have a column that identifies the case, patient, animal, etc, and columns with the continuous x and y variables (row with x = NA will be removed). If there are multiple groups in the data, you can filter to the single group of interest with the category and group arguments. Otherwise it assumes the entire dataset is the single population.
result <- trendyspliner(data = ChickWeight, xvar = 'Time', yvar = 'weight', category = 'Diet', cases = 'Chick', groups = c(1,2)) result$pval
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.