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.
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
)
Returns a ME.fcQR_IV.SIMEX class object. It is a list that contains the following elements.
A Fourier_series or bspline_series object, represents the functional coefficient parameter of the functional covariate.
The estimate of the linear coefficients of the scalar covariates.
Original estimate of linear coefficients.
Type of funtion basis used.
Same as in the input arguements.
A 2-element vector, represents an interval, means the domain of the functional covariate.
Sequence of the measurement (time) points.
Regression model.
formula object contains only the scalar covariate(s).
levels of the non-continuous scalar covariate(s).
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.
A dataframe or matrix, represents \(W\), the measurement of \(X\). Each row represents a subject. Each column represent a measurement (time) point.
Scalar covariate(s),
can be not input or NULL
(when there's no scalar covariate),
an atomic vector (when only one scalar covariate), a matrix or data frame,
recommended form is a data frame with column name(s).
A dataframe or matrix, represents \(M\), the instrumental variable. Each row represents a subject. Each column represent a measurement (time) point.
Quantile \(\tau\in(0,1)\), default is 0.5.
A 2-element vector, represents an interval, means the domain of the functional covariate. Default is c(0,1), represent interval \([0,1]\).
Sequence of the measurement (time) points, default is NULL
.
A formula without the response variable, contains only scalar covariate(s), no random effects. If not assigned, include all scalar covariates and intercept term.
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 fourier_basis_expansion
and bspline_basis_expansion
.
Indicate number of the function basis.
When using Fourier basis \(\frac{1}{2},\sin k t, \cos k t, k = 1,\dots,K\),
basis.order is the number \(K\).
When using b-splines basis \(\{B_{i,p}(x)\}_{i=-p}^{k}\),
basis.order is the number of splines, equal to \(k+p+1\).
(same as arguement df
in bs
.)
May set a individual number for each functional covariate.
When the element of this argument is less than the number of functional covariates,
it will be used recursively.
Degree of the piecewise polynomials if use b-splines basis,
default is 3. See degree
in bs
.
Tekwe, Carmen D., et al. "Estimation of sparse functional quantile regression with measurement error: a SIMEX approach." Biostatistics 23.4 (2022): 1218-1241.
data(MECfda.data.sim.0.2)
# \donttest{
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')
# }
Run the code above in your browser using DataLab