Learn R Programming

cdfquantreg (version 1.3.1-2)

cdfquantregFT: CDF-Quantile Finite Tailed Probability Distributions

Description

cdfquantregFT is a function to fit a cdf quantile regression with a variety of finite tailed distributions. It can account for data that has boundary values.

Usage

cdfquantregFT(
  formula,
  fd = NULL,
  sd = NULL,
  mu.fo = NULL,
  inner = FALSE,
  version = "V",
  data,
  family = NULL,
  start = NULL,
  ssn = 20,
  control = cdfqr.control(...),
  ...
)

Value

An object of class cdfqrFT will be returned. Generic functions such as summary,print 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:

coefficients

A named vector of coefficients.

residuals

Raw residuals, the difference between the fitted values and the data.

fitted

The fitted values, including full model fitted values, fitted values for the mean component, and fitted values for the dispersion component.

rmse

The model root mean squared errors

rmseLogit

The root mean squared errors between the logit of the fitted values, and the logit of the response values.

vcov

The variance-covariance matrix of the coefficient estimates.

AIC, BIC

Akaike's Information Criterion and Bayesian Information Criterion.

deviance

The deviance for the model.

Arguments

formula

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 dispersion (sigma; first) and skewness (theta; second) submodels can be separated by '|'. So y ~ X1 | X2 specifies that the DV is y, X1 is the predictor in the dispersion submodel, and X2 is the predictor in the skewness submodel.

fd

A string that specifies the parent distribution. At the moment, only "arcsinh", "cauchit" and "t2" can be used. See details.

sd

A string that specifies the child distribution. At the moment, only "arcsinh", "cauchy" and "t2" can be used. See details.

mu.fo

A formula object to indicate the predictors for the location submodel if the 3-parameter distribution is used, only input as ~ predictors

inner

A logic value that indicates if the inner (inner = TRUE) case or outer (inner = FALSE) will be used. Currently inner case can only be used for 2-parameter distributions.

version

A string indicates that which version will be used. "V" is the tilt transformation while "W" indicates the Jones Pewsey transformation.

data

The data in a data.frame format

family

If `fd` and `sd` are not provided, the name of a member of the family of distributions can be provided (see below) for details of family functions)

start

The starting values for model fitting. If not provided, default values will be used.

ssn

The number of searches on optimal starting values to be performed. If model does not converge, can increase this number.

control

Control optimization parameters (See cdfqr.control))

...

Currently ignored.

Details

The cdfquantregFT function fits a quantile regression model with a distributions from the cdf-quantile finite tailed distributions. Here is the list of currently available distributions.

Bimodal Shape Distributions

DistributionR inputAlternative InputAvailable VersionArcSinh-ArcSinh
fd = "arcsinh", sd = "arcsinh"family = "arcsinh-arcsinh""V", "W"ArcSinh-Cauchyfd = "arcsinh", sd = "cauchy"
family = "arcsinh-cauchy""V", "W"Cauchit-ArcSinhfd = "cauchit", sd = "arcsinh"family = "cauchit-arcsinh"
"V", "W"Cauchit-Cauchyfd = "cauchit", sd = "cauchy"family = "cauchit-cauchy""V", "W"
T2-T2fd = "t2", sd = "t2"family = "t2-cauchy""V", "W"

Examples

Run this code
data(cdfqrExampleData)
fit <- cdfquantregFT(pnurse ~ Ambulance |Ambulance ,
 fd = "arcsinh", sd = "arcsinh",  inner = FALSE, version = "V", data = yoon)
summary(fit)

Run the code above in your browser using DataLab