1 |
n |
|
q |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (n = 100, q = 5)
{
y <- 0 * 1:n
beta <- 0 * 1:q
beta[1:3] <- 1
alpha <- -2.5
x <- matrix(rnorm(n * q), nrow = n, ncol = q)
x <- 0.5 * x + 1
SP <- alpha + x %*% beta
y <- rpois(n, lambda = exp(SP))
list(x = x, y = y)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.