Re: [R] lm without intercept

2012-08-15 Thread citynorman
The cor(mtcars$mpg, fitted(m0))^2 method works great - thanks so much Josh! I've had another instance (also ex intercept) where it actually gave the correct number, odd behavior. Thanks for the other posts also. As an aside, in my application a zero intercept makes economic sense and I'm using

Re: [R] lm without intercept

2012-07-28 Thread citynorman
I've just picked up R (been using Matlab, Eviews etc) and I'm having the same issue. Running reg=lm(ticker1~ticker2) gives R^2=50% while running reg=lm(ticker1~0+ticker2) gives R^2=99%!! The charts suggest the fit is worse not better and indeed Eviews/Excel/Matlab all say R^2=15% with