cterFit: Fit the continuous threshold expectile regression

Description Usage Arguments Value Author(s) Examples

View source: R/cterFit.R

Description

The grid search algorithm for the continuous threshold expectile regression

Usage

1
cterFit(y, x, z, tau = 0.5, max.iter = 100, tol = 1e-04)

Arguments

y

A vector of response

x

A scalar covariate with threshold

z

A vector of covariates

tau

the expectile level, 0.5 for default

max.iter

the maximum iteration steps, 100 for default

tol

tolerance value, 1e-4 for default

Value

A list with the elements

coef.est

The estimated regression coefficients with intercept.

threshold.est

The estimated threshold.

coef.se

The estimated standard error of the regression coefficients.

threshold.se

The estimated standard error of the threshold.

iter

The iteration steps.

Author(s)

Feipeng Zhang and Qunhua Li

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
## simulated data
ptm <- proc.time()
n <- 200
t0 <- 1.5
bet0 <- c(1, 3, -2, 1)
tau <- 0.3
modtype <- 1
errtype <- 1
dat <- cterSimData(n, bet0, t0, tau, modtype, errtype)
y <- dat[, 1]
x <- dat[, 2]
z <- dat[, 3]
fit <- cterFit(y, x, z, tau)

## The example of Baseball pitcher salary
data(data_bbsalaries)
y <- data_bbsalaries$y
x <- data_bbsalaries$x
z <- NULL
tau <- 0.5
fit <- cterFit(y, x, z, tau)
proc.time() - ptm

cthreshER documentation built on May 2, 2019, 7:58 a.m.

Related to cterFit in cthreshER...