mfpca.sc(Y = NULL, id = NULL, visit = NULL, twoway = FALSE,
argvals = NULL, nbasis = 10, pve = 0.99, npc = NULL, makePD = FALSE,
center = TRUE, cov.est.method = 2, integration = "trapezoidal")NULL.FALSE.pve).FALSE Only FALSE is currently supported.Y? Set to FALSE if you have already demeaned the data using
your favorite mean function estimate.1, a
one-step method that applies a bivariate smooth to the $y(s_1)y(s_2)$
values. This can be very slow. If set to 2 (the default), a two-step
method that obtains a naive covariance est"trapezoidal" is currently supported.mfpca containing:Y, estimated curves for all subjects and visitscenter==FALSE).npc, or the minimum
number of basis functions needed to explain proportion pve of the
variance in the observed curves for levels 1 and 2.mfpca.sc uses penalized splines to smooth the covariance functions, as
Described in Di et al. (2009) and Goldsmith et al. (2013).data(DTI)
DTI = subset(DTI, Nscans < 6) ## example where all subjects have 6 or fewer visits
id = DTI$ID
Y = DTI$cca
mfpca.DTI = mfpca.sc(Y=Y, id = id, twoway = TRUE)Run the code above in your browser using DataLab