Description Usage Arguments Details Value
View source: R/reliability_function.R
This function is used in the reliability extraction function to generate the estimates of the various reliability statistics The output is a large table with various parameters in columns and each outcome measure in rows Prior to its use, one must generate a long-form and wide-form df of the data, and a vector called variable_names that stores the variables of interest
1 |
df |
dataframe input in wide form |
Analysis and calculations derived from pairwise excel sheet: https://www.sportsci.org/resource/stats/rerlycalc.html Hopkins WG (2015). Spreadsheets for analysis of validity and reliability. Sportscience 19, 36-42 (sportsci.org/2015/ValidRely.htm)
The excel sheet provides a readily accessible, widely-used resource for individuals running reliability analysis. The intent of converting to R function was for ease (rather than running multiple outcomes over the same excel sheet), but also to allow for greater transparency with respect to the underlying math within the excel formulas and conditional formatting. This has also provided a useful teaching tool for walking through the steps of reliability analysis with students.
Code will work for cases of missing values. e.g., if n participants have only two repeat measurements rather than three. Overall purpose: To get the average reliability of the measurements, instead of averaging the reliability of consecutive trials, one must weight their (individual estimates) squares by the degrees of freedom and take the square root.
There are instances where the CIs were not required for the manuscripts, so will be 'commented out'. If an individual wished to use these parameters, just remove the '#' If working with a Mac, this would be achieved quickly by highlighting the required code and using cmd+shift+c In all cases, useable data does not contain a space between the '#' and the variable/data On the other hand, all titles contain a space between the '#' and the text
NOTES: The reliability function was written to only allow for 3 independent repeat measures (i.e., consistent with our design and the maximum often completed in the field). The full R implementation, i.e., allowing for more than 3 replicates is almost complete and will be uploaded to OSF as a separate script when complete.
The script also mixes base and tidyverse functionality. As with most of the R language, there are multiple ways to achieve the same outcome. The choice of base or tidyverse was chosen based on ease of achieving a given outcome when writing the script. Similarly, and often considered blasphemy in R, for/while/if loops were used in some instances where apply/lapply/sapply function are also possible. Often this was for ease of teaching/demonstrating the calculations for an individual not accustomed to any program language.
dataframe of the calculated reliability statistics
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.