Learn R Programming

⚠️There's a newer version (1.1.0) of this package.Take me there.

petersenlab

Package Overview

The petersenlab package contains a collection R functions that are widely used by the Petersen Lab (the Developmental Psychopathology Lab at the University of Iowa). Included are functions for various purposes, including evaluating the accuracy of judgments and predictions, performing scoring of assessments, generating correlation matrices, conversion of data between various types, data management, psychometric evaluation, extensions related to latent variable modeling, various plotting capabilities, and other miscellaneous useful functions. By making the package available, we hope to make our methods reproducible and replicable by others and to help others perform their data processing and analysis methods more easily and efficiently. The package website is here: https://devpsylab.github.io/petersenlab. The source code for the package is here: https://github.com/DevPsyLab/petersenlab.

Installing the Package

To install the package, run the following in R:

install.packages("remotes")
remotes::install_github("DevPsyLab/petersenlab")

Package Functions

A list of the functions included in the package is here: https://devpsylab.github.io/petersenlab/reference

Citing the Package

To obtain the citation for the petersenlab package, run citation("petersenlab"); the citation is:

Petersen, I. T. (2024). petersenlab: A collection of R Functions by the Petersen Lab. R package version 1.0.0. https://github.com/DevPsyLab/petersenlab, https://doi.org/10.5281/zenodo.7602890

A BibTeX entry for LaTeX users is:

@software{petersenlab,
  author = {Isaac T. Petersen},
  title = {{petersenlab}: A collection of {R} Functions by the {Petersen Lab}},
  url = {https://github.com/DevPsyLab/petersenlab},
  doi = {10.5281/zenodo.7602890},
  version = {1.0.0},
  year = {2024}
}

License

License: MIT

This work is licensed under The MIT License.

MIT License

Copy Link

Version

Install

install.packages('petersenlab')

Monthly Downloads

451

Version

1.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Isaac T. Petersen

Last Published

April 30th, 2024

Functions in petersenlab (1.0.0)

crossTimeCorrelation

Cross-Time Correlations.
imputationCombine

Combine Results from Mixed Effect Imputation Models.
imputationPRV

Proportional Reduction of Variance from Imputation Models.
is.nan.data.frame

NaN (Not a Number).
getDependencies

Package Dependencies.
%ni%

NOTIN Operator.
meanSum

Mean Sum.
make_esem_model

Make ESEM Model.
fourPL

4-Parameter Logistic Curve.
lmCombine

Combine Results from Multiple Regression Imputation Models.
itemInformation

Item Information.
imputationModelCompare

Compare Mixed Effect Imputation Models.
timesPerInterval

Frequency Per Duration.
mySum

My Sum.
mortgage

Mortgage Principal and Interest.
lmeSummary

Summarize mixed effects model.
load_or_install

Load or Install Packages.
pValue

p-values.
partialcor.table

Partial Correlation Matrix.
not_any_na

Not Any NA.
dropRowsWithAllNA

Drop NA rows.
equiv_chi

Chi-Square Equivalence Test for Structural Equation Models.
nomogrammer

Create Nomogram.
not_all_na

Any Rows Not NA.
plot2WayInteraction

Plot 2-way interaction.
pom

Proportion of Maximum (POM).
optimalCutoff

Optimal Cutoff.
repeatability

Repeatability.
reliabilityOfDifferenceScore

Reliability of Difference Score.
read.aes

Read Encrypted Data.
ppPlot

PP Plot.
puc

Percent of Uncontaminated Correlations (PUC).
recode_intensity

Recode Intensity.
reverse_score

Reverse Score Variables.
satorraBentlerScaledChiSquareDifferenceTestStatistic

Satorra-Bentler Scaled Chi-Square Difference Test Statistic.
percentileToTScore

Percentile to T-Score Conversion.
simulateAUC

Simulate Area Under the ROC Curve (AUC).
standardErrorIRT

Standard Error of Measurement (IRT).
suppressLeadingZero

Suppress Leading Zero.
setLabPath

Set Lab Path.
specify_decimal

Specify Decimals.
simulateIndirectEffect

Simulate Indirect Effect.
update_nested

Update Nested Models in Hierarchical Regression.
vwReg

Visually Weighted Regression.
percentEffort

Person Months.
redcapProgressBar

Progress Bar for REDCap.
write.aes

Write Encrypted Data.
reliabilityIRT

Reliability (IRT).
pA

Bayes' Theorem.
convert.magic

Convert Variable Types.
addText

Add Correlation to Scatterplot.
complement

Simulate Complement Variable.
accuracyOverall

Overall Accuracy.
Mode

Statistical Mode.
columnBindFill

Column Bind and Fill.
attenuationCorrelation

Attenuation of True Correlation Due to Measurement Error.
accuracyAtCutoff

Accuracy at a Given Cutoff.
accuracyAtEachCutoff

Accuracy at Each Cutoff.
convertToMinutes

Convert Time to Minutes.
crossTimeCorrelationDF

Cross-Time Correlations Dataframe.
convertToHours

Convert Time to Hours.
discriminationToFactorLoading

Discrimination (IRT) to Standardized Factor Loading.
dropColsWithAllNA

Drop NA columns.
convertHoursAMPM

Convert AM and PM Hours.
cor.table

Correlation Matrix.
convertToSeconds

Convert Time to Seconds.
disattenuationCorrelation

Disattenuation of Observed Correlation Due to Measurement Error.