abess
abess copied to clipboard
How to set test data
how to set a fixed test data, to eval model?
Hello, if I haven't misunderstood your question, you require code to generate simulated data and ensure that the data generated by this code is always consistent. In that case, the seed parameter of the generate.data function should meet your requirements. Here's a simple example:
library(abess)
n <- 100
p <- 20
support.size <- 3
seed <- 2023
dataset <- generate.data(n, p, support.size, family = "gaussian", seed=seed)
If my understanding is incorrect, or if you have any further questions, please continue the discussion.