TPDT: TPDT

Description Usage Arguments Methods (by class) Examples

Description

The package provides the necessary tools to compute a TPDT for a general dataset. The data required are paired, time-resloved observations. The output of the statistical test allows to decide whether there are significant differences between both groups and to quantify the impact of those differences. The package is extended by generic functions which may be applied on the computed test object and help visualize the test results. Additionally a function which allows to sample random curves around a given smooth curve and a cross validation function are presented to the user.

Main function to perform a TPDT for a given dataset.

Usage

1
2
3
4
5
6
7
8
9
TPDT(x, ...)

## S3 method for class 'numeric'
TPDT(data, group, time, id, deriv = 0, B = 100,
  lambda = NULL, ncores = 1, ...)

## S3 method for class 'data.frame'
TPDT(data, deriv = 0, B = 100, lambda = NULL,
  ncores = 1, nbas = NULL, ...)

Arguments

data

either a [data.frame] with columns named "data", "group", "time" and "id" analogously to the use of TPDT.numeric. If using TPDT.numeric, a vector with same order as group, time and id vector.

group

[numeric/factor] vector with grouping variable. A character vector will be converted in to numeric 1/2 internally.

time

[numeric] vector of time points, has to be the same order as data, group and id.

id

[numeric] vector of pairings. Each unique value of id should be present in both groups.

deriv

[integer] If 1, test is conducted on first derivative of functional data. If 2, tests second derivative and so on.

lambda

[numeric] Smoothing parameter to use, if known in advance. If NULL, it is computed by cross validation.

ncores

[integer] Number of CPUs to use for parallization.

Methods (by class)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# simulated random data
df <- data.frame(data = rnorm(60), expand.grid(time=1:10, group=1:2, id=1:3)) 
# apply test
res <- TPDT(df)
# print result
res
# plotting method
plot(res)
# illustration of concept
plot(res, plottype = 3)

toreerdmann/TPDT documentation built on May 29, 2019, 10:39 a.m.