Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想用 100 个变量运行回归,但在 lm() 中添加 100 个变量太长了。我怎样才能为这个问题运行一个循环。例如 :regression <- lm(data, y ~ x1 + x2 + x3 + ... + x100)
regression <- lm(data, y ~ x1 + x2 + x3 + ... + x100)