[R] R vs. Excel (R-squared)
Nordlund, Dan
NordlDJ at dshs.wa.gov
Tue Jan 24 22:50:29 CET 2006
> -----Original Message-----
> From: Lance Westerhoff [mailto:lance at quantumbioinc.com]
> Sent: Tuesday, January 24, 2006 10:48 AM
> To: Nordlund, Dan
> Cc: r-help at stat.math.ethz.ch
> Subject: Re: [R] R vs. Excel (R-squared)
>
>
> On Jan 24, 2006, at 12:11 PM, Nordlund, Dan wrote:
> >
> > 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
> >
>
> Hi Dan-
>
> The reason why the intercept is forced to be zero is because I would
> like to determine how well my prediction is compared to experiment.
> Therefore, the only point we really know is (0,0) - everything else
> is conjecture. Both in the excel case and the R case, the intercept
> is forced to be zero. In terms of your question about the regression
> without an intercept in R, I'm not sure what you mean. Haven't I set
> the intercept to be zero?
>
> Thanks!
>
> -Lance
>
Your model formula, a ~ c - 1, estimates a slope coefficient but removes the
column of 1's which would be used to estimate an intercept term (i.e., you
eliminated the intercept term). This effectively forces the regression
through the origin. So yes, you set the intercept to zero.
You stated that "the only point we really know is (0,0)". The reason I
asked about why you were forcing the regression through the intercept is
that *I* don't know that you know anything about what happens when c=0. It
is possible that your measurement process, whatever that might be, has a
bias such that a is not equal to 0 when c=0. Did you actually have any
points where the predicted value was 0? Just something to think about.
Dan
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
mailing list