[R] missing output in summary() and anova()
John Kane
jrkrideau at yahoo.ca
Thu Oct 2 19:06:46 CEST 2008
What version are you running? Under what OS. I don't seem to see the problem with 2.7.2 under Windows XP.
--- On Thu, 10/2/08, Jordan Wong <wong2318 at gmail.com> wrote:
> From: Jordan Wong <wong2318 at gmail.com>
> Subject: [R] missing output in summary() and anova()
> To: r-help at r-project.org
> Received: Thursday, October 2, 2008, 12:59 PM
> > y<-c(131.79, 131.79, 135.02, 135.55, 136.46, 136.83,
> 137.82, 138.00,
> 138.06, 138.04, 140.04, 142.44, 145.47, 144.34, 146.30,
> 147.54, 147.80)
> > x<-c(194.5, 194.3, 197.9, 198.4, 199.4, 199.9,
> 200.9, 201.1, 201.4, 201.3,
> 203.6, 204.6, 209.5,208.6, 210.7, 211.9, 212.2)
> > fitted.results<-lm(y~x)
> > summary(fitted.results)
> Call:
> lm(formula = y ~ x)
> Residuals:
> Min 1Q Median 3Q Max
> -0.32220 -0.14473 -0.06664 0.02184 1.35978
> Coefficients:
> Estimate Std. Error t value Pr(>|t|)
> (Intercept) -42.13778 3.34020 -12.62 2.18e-09 ***
> x 0.89549 0.01645 54.43 < 2e-16 ***
> ---
> Signif. codes: 0 '***' 0.001 '**' 0.01
> '*' 0.05 '.' 0.1 ' ' 1
> Residual standard error: 0.379 on 15 degrees of freedom
> Multiple R-squared: 0.995, Adjusted R-squared: 0.9946
> F-statistic: 2963 on 1 and 15 DF, p-value: < 2.2e-16
> > anova(fitted.results)
> Analysis of Variance Table
> Response: y
> Df Sum Sq Mean Sq F value Pr(>F)
> x 1 425.64 425.64 2962.8 < 2.2e-16 ***
> Residuals 15 2.15 0.14
> ---
> Signif. codes: 0 '***' 0.001 '**' 0.01
> '*' 0.05 '.' 0.1 ' ' 1
>
> -----------------------------------------------------------------------------------------------------------------------------------
>
> The above is the expected result. But when I did that in my
> computer, the
> result became:
>
> -----------------------------------------------------------------------------------------------------------------------------------
>
> > summary(fitted.results)
>
> Call:
> lm(formula = y ~ x)
>
> Residuals:
> Min 1Q Median 3Q Max
> -0.32220 -0.14473 -0.06664 0.02184 1.35978
>
> Coefficients:
> > anova(fitted.results)
> Analysis of Variance Table
>
> Response: y
>
> --------------------------------------------------------------------------------------
>
> The parts below coefficients of summary() and the parts
> below response of
> anova() were missing. I have tried on another two computers
> with older
> versions(2.6,2.6,2) and the problem still exist. Please
> help me, thanks!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained,
> reproducible code.
__________________________________________________________________
[[elided Yahoo spam]]
More information about the R-help
mailing list