### for loop
n <- 10
beta <- 0.3
seq <- seq(from = -1, to = 1, by = 0.1)
theta <- vector("list", 21)
for (i in 1:21) {
  theta_point <- rep(seq[i], n)
  theta_beta <- rep(seq[i] * beta, n)
  theta[[i]] <- cbind(theta_point, theta_beta)
}
res1 <- do.call("rbind", theta)
res1

#### vector
n <- 10
beta <- 0.3
seq <- seq(from = -1, to = 1, by = 0.1)
theta_point <- rep(seq, each = n)
theta_beta <- theta_point * beta
res2 <- cbind(theta_point, theta_beta)
res2

### identical results
identical(do.call("rbind", theta), res)
