Displaying 3 results from an estimated 3 matches for "stolpovsky".
2009 Jul 09
3
How to get function from lm object?
...0)
fit <- lm(y ~ x)
f <- function(x){fit$coef[1] + fit$coef[2]*x}  # Manually constructing function
                                               # Would be nice to do something like this:
                                               # f<-getFunction(fit)
plot(f, 0, 10)
Thanks,
  Alex Stolpovsky
-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution...
2010 Aug 03
0
Issue with prediction from lm object with poly
DDear developeRs,
about a year ago, Alex Stolpovsky posted an issue with predict.lm on a 
fit generated using poly with the raw=TRUE option and too few new data 
(slightly modified reproducible example below). Alex did not get any 
reply. I have just stumbled on the same problem, and I think that this 
is a bug of function poly, which arises from th...
2009 Jul 13
0
problem predict/poly
...poly() is used to obtain prediction. Or am I missing something?
Why I would want to obtain model prediction for a single point is another story. I am filling a matrix of model values one element at a time, so that the matrix can then be given to persp() (I am fitting a two-variable model).
  Alex Stolpovsky
-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution...