[Rd] Bug in stepAIC?

2006-10-04 Thread Martin C. Martin
Hi, It seems that, when I use weights during an initial least-squares regression fit, and later try to add terms using stepAIC(), it uses the weights when looking to remove terms, but not when looking to add them: hills.lm <- lm(time ~ dist + climb, data = hills, weights = 1/dist^2) small.hills

[Rd] update.default evaluating in wrong environment?

2006-10-04 Thread Martin C. Martin
Hi all, update.default, which is the method used to update "lm" objects (among others), extracts the "call" element from it's first argument, updates it, then evaluates it in the parent.frame(). Shouldn't it be evaluated in environment(formula(object)), if that's non-NULL? I ask because I call "

[Rd] update.default evaluating in wrong environment?

2006-10-04 Thread Martin C. Martin
Hi all, update.default, which is the method used to update "lm" objects (among others), extracts the "call" element from it's first argument, updates it, then evaluates it in the parent.frame(). Shouldn't it be evaluated in environment(formula(object)), if that's non-NULL? I ask because I cal