MakeFPCAInputs: Format FPCA input

Description Usage Arguments Value

View source: R/MakeFPCAInputs.R

Description

Turn vector inputs to the list so they can be used in FPCA

Usage

1
2
3
4
5
6
7
8
MakeFPCAInputs(
  IDs = NULL,
  tVec,
  yVec,
  na.rm = FALSE,
  sort = FALSE,
  deduplicate = FALSE
)

Arguments

IDs

np-by-1 vector of subject IDs (Default: NULL)

tVec

Either an np-by-1 vector of measurement times, or a p-by-1 vector corresponding to the common time support

yVec

n-by-1 vector of measurements from the variable of interest, or a n-by-p matrix with each row corresponding to the dense observations.

na.rm

logical indicating if NA should be omitted (Default: FALSE)

sort

logical indicating if Lt (and the correspoding Ly values) should be ensured to be sorted (Default: FALSE)

deduplicate

logical indicating if the Lt should be ensured not to have within-subject duplicated values; the Ly values of repeated Lt values are averaged (Default: FALSE)

Value

L list containing 3 lists each of length 'm', 'm' being the number of unique subject IDs


fdapace documentation built on May 24, 2021, 9:06 a.m.