compareValues2: compareValues2 function

Description Usage Arguments Value Examples

View source: R/compareValues2.r

Description

This is a helper function to aid comparison of values reported in articles to values obtained in reproducibility checks. (1) calculates the percentage error (PE) between a reported value and an obtained value. (2) identifies the error type (decision error, major numerical, minor numerical, no error) (3) user must specificy the value type from the defaults list (or use 'other' if not listed) Errors types are defined as follows: >> 'minor numerical': i.e., >= 2 >> 'major numerical' (i.e., PE >= 10 If p values are being compared, also returns an additional error type: >> 'decision error' (i.e., reported p and obtained p fall on different sides of the .05 threshold) The default value types are as follows: "p" (p-value), "mean" (mean), "sd" (standard deviation), "se" (standard error), "df" (degrees of freedom), "F" (F test statistic), "t" (t test statistic), "bf" (bayes factor), "ci" (confidence interval), "median" (median), "es" (effect size), "irr" (inter-rater reliability), "r" (Pearson correlation coefficient), "z" (Wilcoxon z), "coeff" (regression coefficients), "other")

Usage

1
2
3
compareValues2(reportedValue, obtainedValue, valueType = c("p", "mean", "sd",
  "se", "df", "F", "t", "bf", "ci", "median", "es", "irr", "r", "z", "coeff",
  "other"), updatedReportObject = reportObject)

Arguments

reportedValue

Enter the value reported in the article

obtainedValue

Enter the corresponding value obtained in your reproducibility check

Value

Returns a short text report noting the error type and the PE.

Examples

1
2
3
compareValues2(reportedValue = '3.45', obtainedValue = 1.34, valueType = 'mean')
compareValues2(reportedValue = '.054', obtainedValue = .049, valueType = 'p')
compareValues2(reportedValue = '15.63', obtainedValue = 15.63, valueType = 'sd')

CognitionOpenDataProject/CODreports documentation built on May 6, 2019, 12:21 p.m.