-
-
Notifications
You must be signed in to change notification settings - Fork 75
Solve #598 #600
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
base: main
Are you sure you want to change the base?
Solve #598 #600
Changes from 3 commits
488e78f
737a18a
1f6ab56
de1c79e
a05ba35
f661beb
6a8be12
2654c3c
cc27ca2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -49,4 +49,12 @@ test_that("reflevel", { | |||||||||||||||||||||||||||||||||||||
| as.character(report_intercept(m3)), | ||||||||||||||||||||||||||||||||||||||
| "The model's intercept, corresponding to f = 1, is at 0.17 (95% CI [-0.47, 0.81], t(27) = 0.55, p = 0.584)." | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| # Logical predictor | ||||||||||||||||||||||||||||||||||||||
| mtcars$more_than_4_cyl <- as.logical(mtcars$cyl > 4) | ||||||||||||||||||||||||||||||||||||||
| m4 <- lm(mpg ~ more_than_4_cyl, data = mtcars) | ||||||||||||||||||||||||||||||||||||||
| expect_identical( | ||||||||||||||||||||||||||||||||||||||
| as.character(report_intercept(m4)), | ||||||||||||||||||||||||||||||||||||||
| "The model's intercept, corresponding to more_than_4_cyl = FALSE, is at 26.66 (95% CI [24.41, 28.92], t(30) = 24.16, p < .001)." | ||||||||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| mtcars$more_than_4_cyl <- as.logical(mtcars$cyl > 4) | |
| m4 <- lm(mpg ~ more_than_4_cyl, data = mtcars) | |
| expect_identical( | |
| as.character(report_intercept(m4)), | |
| "The model's intercept, corresponding to more_than_4_cyl = FALSE, is at 26.66 (95% CI [24.41, 28.92], t(30) = 24.16, p < .001)." | |
| ) | |
| mtcars2 <- mtcars | |
| mtcars2$more_than_4_cyl <- as.logical(mtcars2$cyl > 4) | |
| # insight::get_data needs access to data in global environment | |
| assign("mtcars2", mtcars2, envir = .GlobalEnv) | |
| on.exit(rm("mtcars2", envir = .GlobalEnv), add = TRUE) | |
| m4 <- lm(mpg ~ more_than_4_cyl, data = mtcars2) | |
| expect_identical( | |
| as.character(report_intercept(m4)), | |
| "The model's intercept, corresponding to more_than_4_cyl = FALSE, is at 26.66 (95% CI [24.41, 28.92], t(30) = 24.16, p < .001)." | |
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should simply use data(mtcars) here to re-init the data set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The NEWS entry introduces version
0.6.3.1, butDESCRIPTIONstill reports version0.6.3. Please bump the package version inDESCRIPTIONto match and keep NEWS headings consistent with the existing format (e.g., add a "Bug fixes" subsection under the new version header).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bump the version number in the description file.