[R] Extracting SSE from lm
Peter Ehlers
ehlers at ucalgary.ca
Tue Jan 25 19:36:48 CET 2011
On 2011-01-25 08:08, Brian J Mingus wrote:
> Apologies for this simple question -
>
> Given the number of comparisons I need to do it has become somewhat
> laborious to compute the SSE manually. I first have to extract the
> coefficients, build the model and run the model on the data. So far I
> haven't found any method in R that will do this for me. Is there a method
> that I haven't seen, or is there a small function I could write that would
> do this, and how might I go about that?
You can always write a function to automate whatever
you're doing now. But if I understand what you need,
try:
tail( anova( yourModel )[, 2], 1)
Peter Ehlers
>
> Thanks,
>
> Brian
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help
mailing list