Performs FPCA to estimate the density function for each subject.
PP_FPCA_new( t, h1 = NULL, h2 = NULL, N = NULL, bw = "ucv", Tend = 1, ngrid = 101, K.select = c("PropVar", "PPIC"), Kmax = 10, propvar = 0.85, density.method = c("kernel", "local linear"), polybinx = FALSE, derivatives = TRUE )
t | named vector; standardized longitudinal encounter times for a code with the corresponding patient name. They should be less than or equal to 1. |
---|---|
h1, h2 | integers; bandwidth used to estimate the mean intensity function and the covariance function. Default=null. |
N | named vector; the number of observed event with the corresponding patient name. |
bw | a character string; bandwidth estimating method when h1 and h2 are null. Default="ucv", but can also be "nrd0", "nrd", "bcv","SJ-dpi" and "SJ-ste". |
Tend | numeric; the upper bound of the encounter time for the estimated density function. Default=1. |
K.select | characters indicating which method to choose the number of principal components K. Default is K.select="PropVar", and K.select="PPIC" is also available. |
propvar | a proportion of variation used to select number of FPCs. Default is |
density.method | a character string; the method of estimating density function when |
polybinx | logical; if use the same partition (x) for the polynomial regression when |
derivatives | logical; whether to estimate the first derivatives of the density function. Default is TRUE. |
n.grid | an integer value for grid points used in estimating covariance function g. Default is |