PP_FPCA_new: Functional Principal Component Analysis (FPCA)

Description Usage Arguments

View source: R/fpca-main_new.R

Description

Performs FPCA to estimate the density function for each subject.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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
)

Arguments

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.

ngrid

an integer value for grid points used in estimating covariance function g. Default is 101.

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.

Kmax

an integer value. The max of the principle components K. Default is 10.

propvar

a proportion of variation used to select number of FPCs. Default is 0.85.

density.method

a character string; the method of estimating density function when K.select="PPIC". Default is "kernal", but can also be "local linear".

polybinx

logical; if use the same partition (x) for the polynomial regression when density.method="local linear". Default is FALSE.

derivatives

logical; whether to estimate the first derivatives of the density function. Default is TRUE.


celehs/PETLER documentation built on Sept. 3, 2021, 8:21 a.m.