Description Usage Arguments Value Examples
Adapted from Berk, M. (2010).
1 2 3 |
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. |
List with components:
p: pvalue for group differences
fit1: sme-fit object for group 1
fit2: sme-fit object for group 2
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.