Displaying 1 result from an estimated 1 matches for "wraplm".
Did you mean:
wrap
2008 Aug 13
1
Arguments to lm() within a function - object not found
...ing:
8: eval(expr, envir, enclos)
7: eval(extras, data, env)
6: model.frame.default(formula = ..1, weights = wts, drop.unused.levels =
TRUE)
5: model.frame(formula = ..1, weights = wts, drop.unused.levels = TRUE)
4: eval(expr, envir, enclos)
3: eval(mf, parent.frame())
2: lm(weights = wts, ...)
1: wraplm(a ~ b)
It seems like whatever environment lm is trying to eval wts in doesn't
have it defined.
Could anyone tell me what I'm doing wrong?
As a sidenote, I do have a workaround, but this strikes me as really the
wrong thing to do. I replace the call to lm with:
eval(substitute(lm(weights...