Re: [R] inconsistent lm results with fixed response variable

2009-01-20 Thread tyler
Rolf Turner writes: > Oh for Pete's sake! No, just for me. > Computers use floating point arithmetic. Your residual standard error in > case 2 (i.e. 1.44e-14) *is* 0, but floating point arithmetic can't quite see > that this is so. Yes, and that's fine. When I put together a lattice plot to

Re: [R] inconsistent lm results with fixed response variable

2009-01-20 Thread Rolf Turner
Oh for Pete's sake! Computers use floating point arithmetic. Your residual standard error in case 2 (i.e. 1.44e-14) *is* 0, but floating point arithmetic can't quite see that this is so. Put in a check for the RSE being 0, and ``over- ride'' the adjusted R squared to be NA (or NaN, or what

[R] inconsistent lm results with fixed response variable

2009-01-20 Thread tyler
Hi, I'm analyzing a large number of simulations using lm(), a sample of the resulting data is pasted below. In some simulations, the response variable doesn't vary, ie: > tmp[[2]]$richness [1] 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 40 When I analyze this using R