Re: [R] R vs. Excel (R-squared)

From: Nordlund, Dan <NordlDJ_at_dshs.wa.gov>
Date: Wed 25 Jan 2006 - 04:11:25 EST


> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-
> bounces@stat.math.ethz.ch] On Behalf Of Lance Westerhoff
> Sent: Tuesday, January 24, 2006 8:51 AM
> To: r-help@stat.math.ethz.ch
> Subject: [R] R vs. Excel (R-squared)
>
> Hello All-
>
> I found an inconsistency between the R-squared reported in Excel vs.
> that in R, and I am wondering which (if any) may be correct and if
> this is a known issue. While it certainly wouldn't surprise me if
> Excel is just flat out wrong, I just want to make sure since the R-
> squared reported in R seems surprisingly high. Please let me know if
> this is the wrong list. Thanks!
>
<<snip>>
>
> > # note: a is experimental and c is predicted
> > summary(lm(a~c-1))
>
> Call:
> lm(formula = a ~ c - 1)
>
> Residuals:
> Min 1Q Median 3Q Max
> -2987.6 -1126.6 -181.7 855.3 5602.8
>
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> c 0.99999 0.01402 71.33 <2e-16 ***
> ---
> Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
>
> Residual standard error: 1423 on 365 degrees of freedom
> Multiple R-Squared: 0.9331, Adjusted R-squared: 0.9329
> F-statistic: 5088 on 1 and 365 DF, p-value: < 2.2e-16
>
<<snip>>

> Thank you very much for your time!
>
> -Lance
> ____________________
> Lance M. Westerhoff, Ph.D.
> General Manager
> QuantumBio Inc.
>
> WWW: http://www.quantumbioinc.com
> Email: lance@quantumbioinc.com
>
>

Lance,

Did you force the regression through the origin in Excel, like you are doing with your R code? And why are you doing the regression without an intercept in R?

Dan

Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services Olympia, WA 98504-5204



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Wed Jan 25 04:59:43 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:10 EST