The model given, ~0 +factor, omitted an intercept. R^2 is meaningless
without an intercept.
Further discussion should go to a statistics list like
stats.stackexchange.com, as these are statistics, not R, issues.
Cheers,
Bert
On Sun, Aug 4, 2013 at 1:41 PM, Rui Barradas wrote:
> Hello,
>
> Hoe d
Hello,
Hoe did you get 0.002? Can you ?dput your data?
d <- read.table(text = "
factor observation
-0.003 -2
-0.002 -2
-0.001 -1
0.000 1
0.001 0
0.002 1
0.003 2
", header = TRUE)
fit <- lm(observation ~ 0 + factor, data = d)
summary(fit) # R2
Hi gurus!
What I need to do is to find a model, which can predict what the *
observation* should look like given a *factor* input.
i am doing a simple linear fit in R:
lm(observation~0+factor, data=d), the R^2 is 0.002, which is really small.
however, when I do a 'SELECT AVG observation by 0.00
3 matches
Mail list logo