Displaying 2 results from an estimated 2 matches for "qss1".
Did you mean:
dss1
2006 Feb 05
1
how to extract predicted values from a quantreg fit?
Hi,
I have used package quantreg to estimate a non-linear fit to the
lowest part of my data points. It works great, by the way.
But I'd like to extract the predicted values. The help for
predict.qss1 indicates this:
predict.qss1(object, newdata, ...)
and states that newdata is a data frame describing the observations
at which prediction is to be made.
I used the same technique I used to extract predicted values of GAM
fits with mgcv package: if I fit a GAM using x as the x variable on
w...
2009 Apr 11
1
data argument and environments
...d)
this is fine when invoked as is; x and y are found in d, and lam is
found the .GlobalEnv,
or at least this is how I understand it. Now, I'd like to have a
function say,
h <- function(lam)
AIC(rqss(y ~ qss(x, lambda = lam), data = d))
but now, if I do:
rm(lam)
h(1)
Error in qss1(x, constraint = constraint, lambda = lambda, dummies =
dummies, :
object "lam" not found
worse, if there is a "lam" in the .GlobalEnv it is used instead of
the argument specified to h().
If I remove the data=d argument in the function definition then lam is
passed co...