Re: [R] Improving function that estimates regressions for all variables specified

2016-09-01 Thread Adams, Jean
You may be able find someone else's function that already does you want. For example the dredge() function of the MuMIn package. http://rpackages.ianhowson.com/cran/MuMIn/man/MuMIn-package.html Jean On Fri, Aug 26, 2016 at 1:11 PM, Jorge Cimentada wrote: > Hi, I'd like some feedback on how to

[R] Improving function that estimates regressions for all variables specified

2016-08-26 Thread Jorge Cimentada
Hi, I'd like some feedback on how to make this function more "quicker and parsimonious". I normally run several regressions like this: y ~ x1 y ~ x1 + x2 y ~ x1 + x2 +xn Instead, I created a function in which I specify y, x1 and x2 and the function automatically generates: y ~ x1 y ~ x1 + x2 y ~