ME.fcQR_IV.SIMEX {MECfda} | R Documentation |
Bias correction method of applying quantile linear regression to dataset with one functional covariate with measurement error using instrumental variable.
Description
Perform a two-stage strategy to correct the measurement error of
a function-valued covariate and then fit a linear quantile regression model.
In the first stage, an instrumental variable is used to estimate
the covariance matrix associated with the measurement error.
In the second stage, simulation extrapolation (SIMEX) is used to correct for
measurement error in the function-valued covariate.
See detailed model in the reference.
Usage
ME.fcQR_IV.SIMEX(
data.Y,
data.W,
data.Z,
data.M,
tau = 0.5,
t_interval = c(0, 1),
t_points = NULL,
formula.Z,
basis.type = c("Fourier", "Bspline"),
basis.order = NULL,
bs_degree = 3
)
Arguments
data.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. |
data.W |
A dataframe or matrix, represents |
data.Z |
Scalar covariate(s),
can be not input or |
data.M |
A dataframe or matrix, represents |
tau |
Quantile |
t_interval |
A 2-element vector, represents an interval,
means the domain of the functional covariate. Default is c(0,1), represent interval |
t_points |
Sequence of the measurement (time) points, default is |
formula.Z |
A formula without the response variable, contains only scalar covariate(s), no random effects. If not assigned, include all scalar covariates and intercept term. |
basis.type |
Type of funtion basis.
Can only be assigned as one type even if there is more than one functional covariates.
Available options: 'Fourier' or 'Bspline', represent Fourier basis and b-spline basis respectively.
For the detailed form for Fourier and b-splines basis,
see |
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 |
Value
Returns a ME.fcQR_IV.SIMEX class object. It is a list that contains the following elements.
coef.X |
A Fourier_series or bspline_series object, represents the functional coefficient parameter of the functional covariate. |
coef.Z |
The estimate of the linear coefficients of the scalar covariates. |
coef.all |
Original estimate of linear coefficients. |
function.basis.type |
Type of funtion basis used. |
basis.order |
Same as in the input arguements. |
t_interval |
A 2-element vector, represents an interval, means the domain of the functional covariate. |
t_points |
Sequence of the measurement (time) points. |
formula |
Regression model. |
formula.Z |
formula object contains only the scalar covariate(s). |
zlevels |
levels of the non-continuous scalar covariate(s). |
References
Tekwe, Carmen D., et al. "Estimation of sparse functional quantile regression with measurement error: a SIMEX approach." Biostatistics 23.4 (2022): 1218-1241.
Examples
data(MECfda.data.sim.0.2)
res = ME.fcQR_IV.SIMEX(data.Y = MECfda.data.sim.0.2$Y,
data.W = MECfda.data.sim.0.2$W,
data.Z = MECfda.data.sim.0.2$Z,
data.M = MECfda.data.sim.0.2$M,
tau = 0.5,
basis.type = 'Bspline')