cterSimData {cthreshER} | R Documentation |
Simulated data from the continuous threshold expectile regression
Description
The function for simulating data from the continuous threshold expectile regression
Usage
cterSimData(n, bet0, t0, tau = 0.5, modtype = 1, errtype = 1)
Arguments
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, |
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. |
Value
A matrix with the elements
y |
The response variable. |
x |
The scalar covariate with threshold. |
z |
A vector of covariates. |
Author(s)
Feipeng Zhang and Qunhua Li
Examples
## 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
[Package cthreshER version 1.1.0 Index]