Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

meanT

Mean t-Statistic Between Two Groups of Growth Curves


Description

The mean-t statistic of the distance between two groups of growth curves.

Usage

meanT(y1, y2)

Arguments

y1

matrix of response values for the first group, with a row for each individual and a column for each time. Missing values are allowed.

y2

matrix of response values for the second group. Must have the same number of columns as y1. Missing values are allowed.

Details

This function computes the pooled two-sample t-statistic between the response values at each time, and returns the mean of these values weighted by the degrees of freedom. This function is used by compareGrowthCurves.

Value

numeric vector of length one containing the mean t-statistic.

Author(s)

Gordon Smyth

See Also

Examples

y1 <- matrix(rnorm(4*3),4,3)
y2 <- matrix(rnorm(4*3),4,3)
meanT(y1,y2)

data(PlantGrowth)
compareGrowthCurves(PlantGrowth$group,as.matrix(PlantGrowth$weight))
# Can make p-values more accurate by nsim=10000

statmod

Statistical Modeling

v1.4.36
GPL-2 | GPL-3
Authors
Gordon Smyth [cre, aut], Yifang Hu [ctb], Peter Dunn [ctb], Belinda Phipson [ctb], Yunshun Chen [ctb]
Initial release
2021-05-10

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.