Title: | An R Package for Single-Index Quantile Regression |
---|---|
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. |
Authors: | Tianhai Zu [cre], Yan Yu [aut] |
Maintainer: | Tianhai Zu <[email protected]> |
License: | GPL-3 |
Version: | 0.8.1 |
Built: | 2025-02-19 04:13:44 UTC |
Source: | https://github.com/zzz1990771/siqr |
Data generation function for simulation and demonstration There are three settings.
generate.data( n, true.theta = NULL, sigma = 0.1, setting = "setting1", ncopy = 1 )
generate.data( n, true.theta = NULL, sigma = 0.1, setting = "setting1", ncopy = 1 )
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 |
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
lprq0(x, y, h, tau = 0.5, x0)
lprq0(x, y, h, tau = 0.5, x0)
x |
covariate sequence; |
y |
response sequence; |
h |
bandwidth(scalar); |
tau |
- left-tail probability |
x0 |
point at which the quantile is estimated |
x0 a scalar
fv quantile est; dv - quantile derivative est
plot function of siqr
## S3 method for class 'siqr' plot(x, ..., bootstrap.interval = FALSE)
## S3 method for class 'siqr' plot(x, ..., bootstrap.interval = FALSE)
x |
The SIQR model object |
... |
optional arguments |
bootstrap.interval |
whether to calculate and plot bootstrap interval |
None
Main estimation function of single index quantile regression model. a two step method.
siqr(y, X, tau = 0.5, beta.initial = NULL, h = NULL, maxiter = 30, tol = 1e-08)
siqr(y, X, tau = 0.5, beta.initial = NULL, h = NULL, maxiter = 30, tol = 1e-08)
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 |
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
#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)
#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
## S3 method for class 'siqr' summary( object, digits = max(5, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ... )
## S3 method for class 'siqr' summary( object, digits = max(5, getOption("digits") - 3), signif.stars = getOption("show.signif.stars"), ... )
object |
the single index quantile regression model object |
digits |
controls digits in output |
signif.stars |
whether show the significance stars |
... |
extra arguments |
the summarized information object