[R] all.vars for nested expressions

2013-04-29 Thread flxms
Dear R fellows, Assume I define a <- expression(fn+tp) sen <- expression(tp/a) Now I'd like to know, which variables are necessary for calculating sen all.vars(sen) This results in a vector c(tp,a). But I'd like all.vars to evaluate the sen-object down to the ground level, which would result

[R] all.vars for nested expressions

2013-04-29 Thread flxms
Dear R fellows, Assume I define a <- expression(fn+tp) sen <- expression(tp/a) Now I'd like to know, which variables are necessary for calculating sen all.vars(sen) This results in a vector c(tp,a). But I'd like all.vars to evaluate the sen-object down to the ground level, which would result

Re: [R] add1() alternative

2012-11-04 Thread flxms
Hi Bruno, probably not exactly what you are looking for, but maybe "all subset regression" as in library "leaps" might be an alternative for variable selection? But I am definitely not sure if this is faster than drop1() (calculates more models), nor have I ever tested it with a hierarchical logis