Mid-distribution Functions
cmidecdf.RdCompute conditional mid-cumulative probabilities
Arguments
- formula
an object of class "
formula" (or one that can be coerced to that class): a symbolic description of the model to be fitted. The details of model specification are given under `Details'.- data
an optional data frame, list or environment (or object coercible by as.data.frame to a data frame) containing the variables in the model. By default the variables are taken from the environment from which the call is made.
- ecdf_est
estimator of the (standard) conditional cumulative distribution. The options are:
npc(default) for kernel estimator (Li and Racine, 2008);logit,probit,cloglogfor binomial regression;aofor Aranda-Ordaz binomial regression.- npc_args
named list of arguments for
npcdistbwwhenecdf_est = npc.- theta
values of the Aranda-Ordaz transformation parameter for grid search when
ecdf_est = "ao".- subset
an optional vector specifying a subset of observations to be used in the fitting process.
- weights
an optional vector of weights to be used in the fitting process. Not currently implemented.
- na.action
a function which indicates what should happen when the data contain
NAs.- contrasts
an optional list. See the contrasts.arg of
model.matrix.default.- x
design matrix of dimension \(n * p\).
- y
vector of observations of length \(n\).
- intercept
logical flag. Does
xinclude a vector of ones?
Value
An object of class class cmidecdf with mid-cumulative probabilities. This is a list that contains:
- G
Estimated conditional mid-probabilities. This is a \(n * k\) matrix, where \(n\) is the sample size and \(k\) is the number of unique values of
y.- Fhat
Estimated (standard) cumulative probabilities.
- Fse
Standard error for Fhat.
- yo
unique values of
y.- bw
npcdistbwobject.- ecdf_est
estimator used.
References
Geraci, M. and A. Farcomeni. Mid-quantile regression for discrete responses. arXiv:1907.01945 [stat.ME]. URL: https://arxiv.org/abs/1907.01945.
Li, Q. and J. S. Racine (2008). Nonparametric estimation of conditional cdf and quantile functions with mixed categorical and continuous data. Journal of Business and Economic Statistics 26(4), 423-434.
Peracchi, F. (2002). On estimating conditional quantiles and distribution functions. Computational Statistics and Data Analysis 38(4), 433-447.