trendyspliner: Trendyspliner

View source: R/pk_trendyspline.R

trendysplinerR Documentation

Trendyspliner

Description

Test for a significant non-zero trend in a response over time.

Usage

Permutation to test whether there is a non-zero trend among a set
of individuals/samples over a continuous variable -- such as time. So, there
does not need to be two groups in this test. The x variable datapoints are
permuated within each case/individual, thus maintaining the distribution in
the y component but shuffling the hypothesized trend.

Arguments

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.

group

If more than one group in the data, the group to compare.

mean_center

Before processing, mean center data by individual/case (default FALSE)

perms

The number of permutations to generate

set_spar

Set the spar parameter for splines

cut_low

Remove data with fewer than __ points

ints

Number of x intervals over which to measure area

quiet

Silence all text outputs

x

The independent variable; is continuous, e.g. time.

y

The dependent variable; is continuous, e.g. temperature.

Details

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.

Examples

result <- trendyspliner(data = ChickWeight, xvar = 'Time',
             yvar = 'weight', category = 'Diet',
             cases = 'Chick', group = '1')
result$pval

RRShieldsCutler/splinectomeR documentation built on April 24, 2022, 2:20 a.m.