cdfquantregC
is the a function to fit a censored cdf quantile regression with a variety of distributions .
cdfquantregC(
formula,
fd = NULL,
sd = NULL,
data,
family = NULL,
censor = "DB",
c1 = NULL,
c2 = NULL,
start = NULL,
control = cdfqr.control(...),
...
)
An object of class cdfquantreg
will be returned. Generic functions such as summary,print (e.g., print.cdfqr) and coef can be used to extract output (see summary.cdfqr for more details about the generic functions that can be used).
Class of object is a list with the following output:
A named vector of coefficients.
Raw residuals, the difference between the fitted values and the data.
The fitted values, including full model fitted values, fitted values for the mean component, and fitted values for the dispersion component.
The model root mean squared errors
The root mean squared errors between the logit of the fitted values, and the logit of the response values.
The variance-covariance matrix of the coefficient estimates.
Akaike's Information Criterion and Bayesian Information Criterion.
The deviance for the model.
A formula object, with the dependent variable (DV) on the left of an ~ operator, and predictors on the right. For the part on the right of '~', the specification of the location and dispersion submodels can be separated by '|'. So y ~ X1 | X2
specifies that the DV is y
, X1
is the predictor in the location submodel, and X2
is the predictor in the dispersion submodel.
A string that specifies the parent distribution.
A string that specifies the child distribution.
The data in a data.frame format
If `fd` and `sd` are not provided, the name of a member of the family of distributions can be provided (See cdfqrFamily
for details of family functions)
A string variable to indicate how many censored point is used- only left censored `LC`
, or only right-hand censored `RC`
, or both sides `DB`
.
The left censored value, if NULL, the minimum value in the data will be used
The right censored value, if NULL, the maximum value in the data will be used
The starting values for model fitting. If not provided, default values will be used.
Control optimization parameters (See cdfqr.control
))
Currently ignored.
The cdfquantreg function fits a quantile regression model with a distributions from the cdf-quantile family selected by the user (Smithson and Shou, 2015). The model is specified in a two-part formula, one part containing the predictors of the location parameter, and the second part containing the predictors of the dispersion parameter. The models are fitted in two stages, the first of which uses the Nelder-Mead algorithm and the second of which takes the estimates from the first stage and applies the BFGS algorithm to refine the estimates.
data(cdfqrExampleData)
fit <- cdfquantregC(crc99 ~ vert | confl, c1 = 0.001, c2= 0.999,
fd ='t2',sd ='t2', data = JurorData)
summary(fit)
Run the code above in your browser using DataLab