Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong values in the table of the section "6.1.3 R code: one-way ANOVA" #24

Open
FVFaleiro opened this issue Dec 6, 2019 · 3 comments
Open

Comments

@FVFaleiro
Copy link

The second line of your table (i.e. lm) are with wrong values, but the results from R are right.
Congratulations for this great tutorial!

@sriki18
Copy link

sriki18 commented Apr 8, 2020

Yup, I noticed that and came here to create an issue as well!

@conjugateprior
Copy link

The fix:

lmF <- as.list(summary(b)$fstatistic)
lmF$pval <- pf(lmF$value, lmF$numdf, lmF$dendf, lower.tail = FALSE)
df = data.frame(
  model = c('Anova', 'lm'),
  df = c(a$Df[1], lmF["numdf"]),
  df.residual = c(a$Df[2], lmF["dendf"]),
  F = c(a$`F value`[1], lmF["value"]),
  p.value = c(a$`Pr(>F)`[1], lmF$pval)
)
print_df(df, 5)

@tankia
Copy link

tankia commented Oct 13, 2023

It appears the displayed values in the Results table of section 6.1.3 are the same as the values in the Results table of section 3.0.3 only rounded to a different digit.
Considering that both sections use the object b, maybe the wrong one was referenced.

Regardless, this document is great. Two thumbs up and thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants