[R] Strange warning in summary.lm
ONKELINX, Thierry
Thierry.ONKELINX at inbo.be
Thu Jul 19 13:55:59 CEST 2007
Dear Peter,
Here's an example. Notice the warning in the last two lines of the summary with options(OutDec = ","). It's not present with options(OutDec = ".").
Cheers,
Thierry
> x <- runif(100)
> y <- rnorm(100)
> options(OutDec = ",")
> summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-2,389749 -0,607002 0,006969 0,689535 1,713197
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0,03397 0,17774 0,191 0,849
x -0,09219 0,29518 -0,312 0,755
Residual standard error: 0,868 on 98 degrees of freedom
Multiple R-Squared: 0.0009943, Adjusted R-squared: -0.0092
F-statistic: 0.09754 on 1 and 98 DF, p-value: 0,7555
Warning message:
NAs introduced by coercion in: as.double.default(Cf[okP])
> options(OutDec = ".")
> summary(lm(y~x))
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-2.389749 -0.607002 0.006969 0.689535 1.713197
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.03397 0.17774 0.191 0.849
x -0.09219 0.29518 -0.312 0.755
Residual standard error: 0.868 on 98 degrees of freedom
Multiple R-Squared: 0.0009943, Adjusted R-squared: -0.0092
F-statistic: 0.09754 on 1 and 98 DF, p-value: 0.7555
----------------------------------------------------------------------------
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics, methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
Belgium
tel. + 32 54/436 185
Thierry.Onkelinx op inbo.be
www.inbo.be
Do not put your faith in what statistics say until you have carefully considered what they do not say. ~William W. Watt
A statistical analysis, properly conducted, is a delicate dissection of uncertainties, a surgery of suppositions. ~M.J.Moroney
> -----Oorspronkelijk bericht-----
> Van: Peter Dalgaard [mailto:P.Dalgaard op biostat.ku.dk]
> Verzonden: donderdag 19 juli 2007 13:37
> Aan: ONKELINX, Thierry
> CC: Uwe Ligges; r-help op stat.math.ethz.ch
> Onderwerp: Re: [R] Strange warning in summary.lm
>
> ONKELINX, Thierry wrote:
> > The problem also exists in a clean workspace. But I've found the
> > troublemaker. I had set options(OutDec = ","). Resetting this to
> > options(OutDec = ".") solved the problem.
> >
> > Thanks,
> >
> > Thierry
> >
> Oups. That sounds like there's a bug somewhere. Can you cook
> up a minimal example which shows the behaviour?
>
> --
> O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
> c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
> (*) \(*) -- University of Copenhagen Denmark Ph:
> (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard op biostat.ku.dk) FAX:
> (+45) 35327907
>
>
>
More information about the R-help
mailing list