[R] Different Estimated values between R and Excel
David Winsemius
dwinsemius at comcast.net
Tue Aug 23 17:46:52 CEST 2011
On Aug 23, 2011, at 7:48 AM, Komine wrote:
> Hi,
> I used simple linear regression with the R software and EXCEL on the
> same
> data. Although , I find the same R2=0.84, I find different estimated
> values
> (intercept and slope). For the R software (slope =0.0009, Intercept =
> -0.1478), for EXCEL (slope =927.7, Intercept = 154,41).
> When I use the estimated values from the R software, the results
> seem bad,
> however the results of Exel seem correct.
> Do you know why I have different estimated values between the R
> software and
> EXCEL?
Well, I don't "know" since you didn't include your code, but on the
basis of the slopes being roughly the inverse of each other, I am
guessing you reversed the roles of the variables and in Excel were
making var2 the dependent variable and in R making var1 dependent.
> I give below a sample of data:
> Thank you in advance
>
> var1 var2
> 0,11 264,6
> 0,01 226,7
> 0,05 168,1
> -0,03 144,9
> -0,07 108,1
> 0 118,22
> -0,09 85,6
> -0,07 103
> -0,05 89,6
> -0,06 92,8
> -0,11 64,9
> -0,11 33
> -0,08 32,5
> -0,12 42,3
> -0,14 36,7
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Different-Estimated-values-between-R-and-Excel-tp3762508p3762508.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list