scienceverse / papercheck

Check Scientific Papers for Best Practices
https://scienceverse.github.io/papercheck/
Other
1 stars 0 forks source link

detect marginally significant effects #2

Open Lakens opened 3 months ago

Lakens commented 3 months ago

Goal: detect incorrectly interpreting effects as marginally significant. Initial code below.

Marginal significance

marginal_regex <- "margin\w (?:\w+\s+){0,5}significan\w|trend\w (?:\w+\s+){0,1}significan\w|almost (?:\w+\s+){0,4}significan\w|approach\w (?:\w+\s+){0,4}significan\w|border\w (?:\w+\s+){0,4}significan\w|close to (?:\w+\s+){0,3}significan\w" text_found <- search_text(xml, marginal_regex) result_df <- data.frame(problem = rep("An interpretation of a 'marginally significant' effect was found", length(text_found)), text = text_found, solution = rep("Researchers sometimes treat p values just above the alpha level as suggestive of support for their prediction. Only p-values smaller than the alpha level are significant. Values above the alpha level are not 'marginally significant' or 'trending away from significant'. Interpreting p-values above the alpha level as support for your prediction increases the Type 1 error rate. Instead, interpret the result as non-significant and reflect on whether the result was a Type 2 error, or use statistics that allow for continuous interpretations (e.g., a likelihood ratio)", length(text_found)))

debruine commented 3 months ago

This is built into the app now, but needs to be added to the package.

Do we want a separate named function exported for each thing like this? Or have this all internal?