View source: R/qrme.R View source: R/old/qrme-old.R
qrme | R Documentation |
Quantile Regression with measurement error in the dependent variable using an EM-algorithm. In practice, this function assumes that the measurement error distribution is a mixture of normal distributions.
qrme(
formla,
tau = 0.5,
data,
nmix = 3,
startbet = NULL,
startmu = NULL,
startsig = NULL,
startpi = NULL,
simstep = "MH",
tol = 1,
iters = 400,
burnin = 200,
drawsd = 4,
cl = 1,
se = FALSE,
biters = 100,
messages = FALSE
)
formla |
y ~ x |
tau |
vector for which quantiles to compute quantile regression |
data |
a data.frame that contains y and x |
nmix |
The number of mixture components of the measurement error |
startbet |
an LxK matrix of starting values for beta where L is the dimension of tau and K is the number of covariates (default is NULL and in this case, the starting values are set to be the QR coefficients coming from QR that ignores measurment error) |
startmu |
A vector of length nmix of starting values for the mean of the mixture of normals distribution for the measurment error (default is NULL and in this case, the starting values are basically set to be equally spaced from -nmix to nmix but forced to have mean 0) |
startsig |
A vector of length nmix of starting values for the standard deviation of the mixture of normals distribution for the measurement error (default is NULL and in this case, the starting values are all set to be 1) |
startpi |
A vector of length nmix of starting values for the fraction of observations in each component of the mimxture of normals distribution for the measurement error (default is NULL and in this case, the starting values are all set to be 1/nmix) |
simstep |
The type of simulation step to use in the EM algorithm. The default is "MH" for Metropolis-Hasting. The alternative is "ImpSamp" for importance sampling. |
tol |
This is the convergence criteria. When the change in the Euclidean distance between the new parameters (at each iteration) and the old parameters (from the previous iteration) is smaller than tol, the algorithm concludes. In general, larger values for tol will result in a fewer number of iterations and smaller values will result in more accurate estimates. |
iters |
How many iterations to use in the simulation step (default is 400) |
burnin |
How many iterations to drop in the simulation step (default is 200) |
drawsd |
The starting standard deviation for the measurement error term. |
cl |
The numbe of clusters to use for parallel computation (default is 1 so that computation is not done in parallel) |
se |
Whether or not to compute standard errors using the bootstrap (default is FALSE) |
biters |
Number of bootstrap iterations to use. Only is considered in the case where computing standard errors (default is 100) |
messages |
Whether or not to report details of estimation procedure (default is FALSE) |
an object of class "merr"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.