The goal of profrep is to calculate individual profile repeatability(Reed et al., 2019).
One of the most common measurements that stress physiologists take isblood samples for corticosterone quantification during a stressresponse. This typically includes a sample at baseline (<3 minutes ofstressor onset), one or more stress-induced samples (e.g. 30 minutesafter stressor onset), and potentially a negative feedback sample(e.g. 120 minutes after stressor onset and/or after dexamethasoneinjection). Such time series are called “stress response curves” and maybe taken multiple times in one individual. If researchers have multiplestress response curves for an individual, they may want to quantifyrepeatability to investigate, for example, heritibility. The currentstandard in the field is to use linear mixed-effect models (Baugh etal. 2014; Dingemanse and Dochtermann, 2013), however this type ofrepeatability estimate can only be done on populations and on only onetimepoint at a time. Reed et al. (2019) have proposed “ProfileRepeatability,” which uses the full stress response curve (across time)to estimate repeatability for individuals.
‘profrep’ is a R package for computing profile repeatability on anynumber of individuals, any number of timepoints, and any number ofreplicate stress response curves. A full explanation of the math behindProfile Repeatability can be found in Reed et al. (2019).
You can install the development version of profrep fromGitHub usingdevtools with:
# install.packages("devtools")devtools::install_github("ubeattie/profrep")You can install the stable version of profrep fromCRAN with:
install.packages("profrep")Alternatively, if one is using theuse_this package, profrep can beinstalled with:
usethis::use_package("profrep")The most common use pattern for profrep is to load in your data as adata frame to the active session, and pass it to the mainprofrep function. Below, we load in an example data setprovided with the profrep package:
library(profrep)my_data<- profrep::synthetic_data_four_pointn_trials<-4# or however many trials/rows of data per individual existprofrep::profrep(df=my_data,n_timepoints=n_trials)#> individual n_crossings max_variance ave_variance base_score final_score rank#> 1 E 0 6.67 5.42 12.10 0.9925 1#> 2 B 0 15.00 12.92 27.95 0.9912 2#> 3 D 0 26.67 26.40 53.12 0.9887 3#> 4 F 0 58.92 56.59 115.62 0.9790 4#> 5 G 0 91.67 87.42 179.27 0.9611 5#> 6 I 0 106.67 106.67 213.55 0.9461 6#> 7 J 5 106.67 106.67 277.33 0.9026 7#> 8 C 0 207.58 86.81 294.81 0.8861 8#> 9 K 15 106.67 106.67 384.00 0.7613 9#> 10 H 0 375.00 149.42 525.17 0.4374 10#> 11 A 0 456.25 181.88 639.04 0.1993 11If you useprofrep in your own published work, we askthat you include a reference both to the original paper describing themethod (Reed et al., 2019) and the paper introducing this package(Beattie et al., in prep.)