smooth_spline_mean: Smooth spline mean

Description Usage Arguments Value Examples

View source: R/smooth_spline_mean.R

Description

Smooth spline mean

Usage

1
smooth_spline_mean(Y = NULL, argvals = NULL, center = TRUE)

Arguments

Y

a numerical matrix which is given by users.

argvals

a numerical vector which can be given by users.

center

a logical argument, it is TRUE (default).

Value

smoothed mean of given matrix Y.

Examples

1
2
3
4
5
6
### settings
n = 50  # number of subjects
p = 200  #number of time points
Y = matrix(rnorm(n*p), nrow = n, ncol = p)
t = (1:p)/p  # a regular grid on [0,1]
result = smooth_spline_mean(Y = Y, argvals = t)

gozdesert/RPackageProject documentation built on Feb. 13, 2022, 6:31 p.m.