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

Fix duplicated text #280

Merged
merged 3 commits into from
Sep 3, 2022
Merged

Fix duplicated text #280

merged 3 commits into from
Sep 3, 2022

Conversation

etiennebacher
Copy link
Member

Close #279. If ok, we need to update the snapshots in the tests.

Changes: collapse predictors names and the intercept values in the first paragraph.

New output:

library(report)
df <- carData::Mroz
x <- glm(lfp ~ k618 + wc + hc + inc, df, family=binomial(link="logit"))
report(x)
#> We fitted a logistic model (estimated using ML) to predict lfp with k618, wc,
#> hc, inc (formula: lfp ~ k618 + wc + hc + inc). The model's explanatory power is
#> weak (Tjur's R2 = 0.05). The model's intercept, corresponding to k618 = 0, wc =
#> no, hc = no, inc = 0, is at 0.64 (95% CI [0.31, 0.99], p < .001). Within this
#> model:
#> 
#>   - The effect of k618 is statistically non-significant and positive (beta =
#> 0.02, 95% CI [-0.10, 0.13], p = 0.790; Std. beta = 0.02, 95% CI [-0.13, 0.17])
#>   - The effect of wc [yes] is statistically significant and positive (beta =
#> 0.86, 95% CI [0.46, 1.27], p < .001; Std. beta = 0.86, 95% CI [0.46, 1.27])
#>   - The effect of hc [yes] is statistically non-significant and positive (beta =
#> 0.08, 95% CI [-0.29, 0.46], p = 0.658; Std. beta = 0.08, 95% CI [-0.29, 0.46])
#>   - The effect of inc is statistically significant and negative (beta = -0.03,
#> 95% CI [-0.05, -0.02], p < .001; Std. beta = -0.38, 95% CI [-0.55, -0.21])
#> 
#> Standardized parameters were obtained by fitting the model on a standardized
#> version of the dataset. 95% Confidence Intervals (CIs) and p-values were
#> computed using a Wald z-distribution approximation.

Created on 2022-09-01 by the reprex package (v2.0.1)

R/report.lm.R Outdated
info <- report_info(x, effectsize = attributes(params)$effectsize, parameters = params, ...)
model <- report_model(x, table = table, ...)
perf <- report_performance(x, table = table, ...)
intercept <- report_intercept(x, table = table, ...)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we can remove the dots here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah no, my bad, I removed them when I ran the code line by line. I'll clean this tomorrow

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@etiennebacher etiennebacher marked this pull request as ready for review September 2, 2022 07:25
@IndrajeetPatil
Copy link
Member

@etiennebacher Do you also want to update the snapshots?

@IndrajeetPatil IndrajeetPatil requested review from strengejacke and removed request for bwiernik September 2, 2022 14:20
@etiennebacher
Copy link
Member Author

yes I can do that

@IndrajeetPatil
Copy link
Member

Only Windows-specific snapshots were updated, but macOS builds still continue to succeed. How is that possible?! 🤔

@IndrajeetPatil
Copy link
Member

We can figure it out later.

@IndrajeetPatil IndrajeetPatil merged commit 5ad8169 into main Sep 3, 2022
@IndrajeetPatil IndrajeetPatil deleted the 279_fix_dup_text branch September 3, 2022 10:11
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

Successfully merging this pull request may close these issues.

report() generates duplicated paragraphs
3 participants