ttest_berk: Functional t-test for mean curves from two spline mixed...

Description Usage Arguments Value Examples

Description

Adapted from Berk, M. (2010).

Usage

1
2
3
ttest_berk(data, group, timepoints, id, points = 500, prob = 0, NAs = 0,
  nboot = 1000, method = c("non-parametric", "parametric"), ncpus = 1,
  ...)

Arguments

data

[vector] with the response variable, i.e. values of some blood marker

group

[vector] with grouping information. Has to be same length as data and contain two groups.

timepoints

[vector] with timepoints of measurments of the values in data

id

[vector] with index for individuals

points

[numeric] resolution of grid when discretisizing.

NAs

[logical vector] indicator vector corresponding to the rows of data for NA observations.

nboot

[numeric] Number of bootstrap iterations.

method

[choice] Currently only "non-parametric"-Version of the test available.

ncpus

[Integer] number of cores to use in parallel for bootstrap.

Value

List with components:

Examples

1
2
3
4
5
6
7
8
# define underlying function
f <- function(x) 2 * x * sin(x) + 10
# simulate paired data from two groups with underlying function f
simdata <- make_data(f = f, shift = 5, n = 5, sd1 = .5, sd2 = .5,
                     ntimepoints = 10, type = "shift")
# run test
res <-  ttest_berk(data = simdata$data, group = simdata$group, timepoints = simdata$time, 
                   id = simdata$id, method = "non-parametric", nboot = 1000)

erdto/TPDT documentation built on May 16, 2019, 8:24 a.m.