compareValues: compareValues function

Description Usage Arguments Value Examples

View source: R/compareValues.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 (major numerical, minor numerical, no error) (3) if p-values are being compared, user must set isP to TRUE. Function will identify if there is an additional decision error. 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)

Usage

1
compareValues(reportedValue, obtainedValue, isP = F)

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
compareValues(reportedValue = 3.45, obtainedValue = 1.34)
compareValues(reportedValue = .054, obtainedValue = .049, isP = T)
compareValues(reportedValue = 15.63, obtainedValue = 15.63)

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