Re: [Rd] data argument and environments

2009-04-12 Thread roger koenker
Great, thanks again, Duncan. And to Peter. I've adopted the enclos = environment(formula) solution. Roger On Apr 12, 2009, at 2:29 PM, Duncan Murdoch wrote: roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example

Re: [Rd] data argument and environments

2009-04-12 Thread Peter Dalgaard
roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula so t

Re: [Rd] data argument and environments

2009-04-12 Thread Duncan Murdoch
roger koenker wrote: Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula s

Re: [Rd] data argument and environments

2009-04-12 Thread roger koenker
Thanks. Yes, I wrote rqss, and attempted to follow the structure of lm, and various analogues, for example in survival4. My problem seems to be that my lam variable is not part of the data frame d, and I don't know how to manipulate the environment for the formula so that it is found. T

Re: [Rd] data argument and environments

2009-04-11 Thread Duncan Murdoch
On 11/04/2009 6:50 PM, roger koenker wrote: I'm having difficulty with an environmental issue: I have an additive model fitting function with a typical call that looks like this: require(quantreg) n <- 100 x <- runif(n,0,10) y <- sin(x) + rnorm(n)/5 d <- data.frame(x,y) lam <- 2 f <-

[Rd] data argument and environments

2009-04-11 Thread roger koenker
I'm having difficulty with an environmental issue: I have an additive model fitting function with a typical call that looks like this: require(quantreg) n <- 100 x <- runif(n,0,10) y <- sin(x) + rnorm(n)/5 d <- data.frame(x,y) lam <- 2 f <- rqss(y ~ qss(x, lambda = lam), data = d) th