MakeFPCAInputs {fdapace} | R Documentation |
Format FPCA input
Description
Turn vector inputs to the list so they can be used in FPCA
Usage
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