Type: | Package |
Title: | An R Package for Single-Index Quantile Regression |
Version: | 0.8.1 |
Language: | en-US |
Description: | Single-Index Quantile Regression is effective in some scenarios. We provides functions that allow users to fit Single-Index Quantile Regression model. It also provides functions to do prediction, estimate standard errors of the single-index coefficients via bootstrap, and visualize the estimated univariate function. Please see W., Y., Y. (2010) <doi:10.1016/j.jmva.2010.02.003> for details. |
License: | GPL-3 |
Encoding: | UTF-8 |
Depends: | R (≥ 3.6.0) |
Imports: | stats, quantreg, KernSmooth |
RoxygenNote: | 7.1.2 |
NeedsCompilation: | no |
Packaged: | 2021-12-14 20:11:04 UTC; tianhaizu |
Author: | Tianhai Zu [cre], Yan Yu [aut] |
Maintainer: | Tianhai Zu <zuti@mail.uc.edu> |
Repository: | CRAN |
Date/Publication: | 2021-12-14 20:30:02 UTC |
Data generation function for simulation and demonstration There are three settings.
Description
Data generation function for simulation and demonstration There are three settings.
Usage
generate.data(
n,
true.theta = NULL,
sigma = 0.1,
setting = "setting1",
ncopy = 1
)
Arguments
n |
sample size |
true.theta |
true single-index coefficients, default is c(1,1,1)/sqrt(3) for setting 1 and c(1,2)/sqrt(5) for other settings |
sigma |
the standard deviation of error term |
setting |
chose from three settings |
ncopy |
generates multiple copies of data for Monte Carlo simulations |
Value
X predictors
Y response variables
single.index.values single index term
A supporting function that return the local polynomial regression quantile. This estimates the quantile and its derivative at the point x.0
Description
A supporting function that return the local polynomial regression quantile. This estimates the quantile and its derivative at the point x.0
Usage
lprq0(x, y, h, tau = 0.5, x0)
Arguments
x |
covariate sequence; |
y |
response sequence; |
h |
bandwidth(scalar); |
tau |
- left-tail probability |
x0 |
point at which the quantile is estimated |
Value
x0 a scalar
fv quantile est; dv - quantile derivative est
plot function of siqr
Description
plot function of siqr
Usage
## S3 method for class 'siqr'
plot(x, ..., bootstrap.interval = FALSE)
Arguments
x |
The SIQR model object |
... |
optional arguments |
bootstrap.interval |
whether to calculate and plot bootstrap interval |
Value
None
Main estimation function of single index quantile regression model. a two step method.
Description
Main estimation function of single index quantile regression model. a two step method.
Usage
siqr(y, X, tau = 0.5, beta.initial = NULL, h = NULL, maxiter = 30, tol = 1e-08)
Arguments
y |
response vector; |
X |
covariate matrix; |
tau |
left-tail probability (quantile index), scalar |
beta.initial |
starting value of beta, the single index coefficients |
h |
user-defined bandwidth |
maxiter |
max iteration number |
tol |
toleration for convergence |
Value
a siqr object, which includes: beta - the fitted single index coefficients with unit norm and first component being non negative flag.conv - whether the iterations converge
Examples
#generate data
set.seed(2021)
data <- generate.data(50)
X <- data$X
y0<- data$Y
#initials
beta0 <- NULL
#quantile
tau = 0.75
siqr.result <- siqr(y0,X,beta.initial = beta0, tau=tau)
summary(siqr.result)
Function to print summary
Description
Function to print summary
Usage
## S3 method for class 'siqr'
summary(
object,
digits = max(5, getOption("digits") - 3),
signif.stars = getOption("show.signif.stars"),
...
)
Arguments
object |
the single index quantile regression model object |
digits |
controls digits in output |
signif.stars |
whether show the significance stars |
... |
extra arguments |
Value
the summarized information object