[R] R vs. Excel (R-squared)
NordlDJ at dshs.wa.gov
Tue Jan 24 18:11:25 CET 2006
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-
> bounces at stat.math.ethz.ch] On Behalf Of Lance Westerhoff
> Sent: Tuesday, January 24, 2006 8:51 AM
> To: r-help at 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!
> > # note: a is experimental and c is predicted
> > summary(lm(a~c-1))
> lm(formula = a ~ c - 1)
> Min 1Q Median 3Q Max
> -2987.6 -1126.6 -181.7 855.3 5602.8
> 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
> Thank you very much for your time!
> Lance M. Westerhoff, Ph.D.
> General Manager
> QuantumBio Inc.
> WWW: http://www.quantumbioinc.com
> Email: lance at quantumbioinc.com
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
Daniel J. Nordlund
Research and Data Analysis
Washington State Department of Social and Health Services
Olympia, WA 98504-5204
More information about the R-help