Description Usage Arguments Value Author(s) Examples
The function for simulating data from the continuous threshold expectile regression
1 | cterSimData(n, bet0, t0, tau = 0.5, modtype = 1, errtype = 1)
|
n |
sample size. |
bet0 |
the vecotr of true regression coefficients. |
t0 |
the true location of threshold. |
tau |
the expectile level, 0.5 for default. |
modtype |
type of model, 1 = IID for default, 2 = Heteroscedasticity, modtype = 1, Y = beta_0 + beta_1 X + beta_2 (X-t)_+ gamma Z + e, modtype = 1, Y = beta_0 + beta_1 X + beta_2 (X-t)_+ gamma Z + (1+0.2Z)e, |
errtype |
type of error, 1 for default, errtype = 1 for N(0, 1), errtype = 2 for t_4, errtype = 3 for 0.9 N(0, 1) + 0.1 t_4. |
A matrix with the elements
y |
The response variable. |
x |
The scalar covariate with threshold. |
z |
A vector of covariates. |
Feipeng Zhang and Qunhua Li
1 2 3 4 5 6 7 8 9 10 11 | ## simulated data
ptm <- proc.time()
n <- 200
t0 <- 1.5
bet0 <- c(1, 3, -2, 1)
tau <- 0.5
modtype <- 1
errtype <- 1
dat <- cterSimData(n, bet0, t0, tau, modtype, errtype)
head(dat)
proc.time() - ptm
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.