fcQR | R Documentation |
Fit a quantile regression models below
Q_{Y_i|X_i,Z_i}(\tau) = \sum_{l=1}^L\int_\Omega \beta_l(\tau,t) X_{li}(t) dt + (1,Z_i^T)\gamma
where Q_{Y_i}(\tau) = F_{Y_i|X_i,Z_i}^{-1}(\tau)
is the
\tau
-th quantile of Y_i
given X_i(t)
and Z_i
,
\tau\in(0,1)
.
Model allows one or multiple functional covariate(s) as fixed effect(s),
and zero, one, or multiple scalar-valued covariate(s).
fcQR(
Y,
FC,
Z,
formula.Z,
tau = 0.5,
basis.type = c("Fourier", "Bspline"),
basis.order = 6L,
bs_degree = 3
)
Y |
Response variable, can be an atomic vector, a one-column matrix or data frame, recommended form is a one-column data frame with column name |
FC |
Functional covariate(s), can be a "functional_variable" object or a matrix or a data frame or a list of these object(s) |
Z |
Scalar covariate(s), can be |
formula.Z |
A formula without the response variable, contains only scalar covariate(s). If not assigned, include all scalar covariates and intercept term. |
tau |
Quantile |
basis.type |
Type of funtion basis.
Can only be assigned as one type even if there is more than one functional covariates.
Available options: |
basis.order |
Indicate number of the function basis.
When using Fourier basis |
bs_degree |
Degree of the piecewise polynomials if use b-splines basis, default is 3.
See |
fcQR returns an object of class "fcQR". It is a list that contains the following elements.
regression_result |
Result of the regression. |
FC.BasisCoefficient |
A list of Fourier_series or bspline_series object(s), represents the functional linear coefficient(s) of the functional covariates. |
function.basis.type |
Type of funtion basis used. |
basis.order |
Same as in the arguemnets. |
data |
Original data. |
bs_degree |
Degree of the splines, returned only if b-splines basis is used. |
Heyang Ji
data(MECfda.data.sim.0.0)
res = fcQR(FC = MECfda.data.sim.0.0$FC, Y=MECfda.data.sim.0.0$Y, Z=MECfda.data.sim.0.0$Z,
basis.order = 5, basis.type = c('Bspline'))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.