terr {TLIC} | R Documentation |
The terr function is to generate data based on different distributions.
terr(n, p, K, nr, alpha, sigma1, sigma2, beta, dist)
n |
is the total number of observations |
p |
is the number of variables |
K |
is the number of subsets |
nr |
is the number of outliers |
alpha |
is the significance level |
sigma1 |
is a parameter related to the distribution |
sigma2 |
is a parameter related to the distribution |
beta |
is a coefficient vector |
dist |
is the type of distribution |
A list containing the design matrix X and the response vector y
# Example usage of the terr function
n <- 100
p <- 5
K <- 3
nr <- 10
alpha <- 0.05
sigma1 <- 2
sigma2 <- 5
beta <- c(1, 2, 3, 4, 5)
dist <- "Student t Distribution"
result <- terr(n, p, K, nr, alpha, sigma1, sigma2, beta, dist)
X <- result$X
y <- result$y