##################################################################################################
set.seed(1)
n <- 300
x1 <- runif(n, 0, 1)
t_beta <- 1.2
t_sigma <- 0.5
t_lambda <- 0.7
error <- rglg(n, 0, t_sigma, t_lambda)
y1 <- t_beta*x1 + error
data <- data.frame(y1, x1)
# The following examples are based on 50 bootstrap replications.
# A 90% bootstrap confidence interval with the method 'normal'.
bootglg(y1 ~ x1 - 1, data = data, type='normal', B = 50, alpha = 0.1)
# A 95% bootstrap confidence interval with the method 't_student'.
bootglg(y1 ~ x1 - 1, data = data, type='t_student', B = 50)
# A 95% bootstrap confidence interval with the method 'bootstrap_t'.
bootglg(y1 ~ x1 - 1, data = data, type='bootstrap_t', B = 50)
# A 98% bootstrap confidence interval with the method 'BCa'.
# bootglg(y1 ~ x1 - 1, data = data, type='BCa', B = 50, alpha = 0.02)
#################################################################################################
Run the code above in your browser using DataLab