Learn R Programming

userfriendlyscience (version 0.7.2)

userfriendlyscience-package: Userfriendlyscience (UFS)

Description

This package contains a number of functions that serve two goals. First, to make R more accessible to people migrating from SPSS by adding a number of functions that behave roughly like their SPSS equivalents (also see http://rosettastats.com). Second, to make a number of slightly more advanced functions more user friendly to relatively novice users. The package also conveniently houses a number of additional functions that are intended to increase the quality of methodology and statistics in psychology, not by offering technical solutions, but by shifting perspectives, for example towards reasoning based on sampling distributions as opposed to on point estimates.

Arguments

Details

Package: userfriendlyscience
Type: Package
Version: 0.7-1
Date: 2018-05-01
License: GPL (>= 3)

Userfriendlyscience (UFS) contains a number of functions that serve two goals. First, to make R more accessible to people migrating from SPSS by adding a number of functions that behave roughly like their SPSS equivalents (also see http://rosettastats.com for a tool that helps with this). Second, to make a number of slightly more advanced functions more user friendly to relatively novice users. The package also conveniently houses a number of additional functions that are intended to increase the quality of methodology and statistics in psychology, not by offering technical solutions, but by shifting perspectives, for example towards reasoning based on sampling distributions as opposed to on point estimates.

The package imports functions from many other packages, which is in line with its function as a 'wrapper package': UFS aims to make many existing functions easier for users coming from SPSS, so sometimes a function is added when it saves the user just some data preparing.

The package implements many solutions provided by people all over the world, most from Stack Exchange (both from Cross Validated and Stack Overflow). I credit these authors in the help pages of those functions and in the Author(s) section of this page. If you wrote a function included here, and you want me to take it out, feel free to contact me of course (also, see http://meta.stackoverflow.com/questions/319171/i-would-like-to-use-a-function-written-by-a-stack-overflow-member-in-an-r-packag).

References

Peters, G.-J. Y. (2014). The alpha and the omega of scale reliability and validity: why and how to abandon Cronbach's alpha and the route towards more comprehensive assessment of scale quality. European Health Psychologist, 16(2), 56-69.

Peters, G.-J. Y. (2018). Diamond Plots: a tutorial to introduce a visualisation tool that facilitates interpretation and comparison of multiple sample estimates while respecting their inaccuracy. PsyArXiv; under review at Health Psychology Bulletin. Preprint doi: 10.17605/osf.io/9w8yv

Peters, G.-J. Y. & Crutzen, R. (2018). Knowing exactly how effective an intervention, treatment, or manipulation is and ensuring that a study replicates: accuracy in parameter estimation as a partial solution to the replication crisis. PsyArXiv; under review at Psychology & Health. Preprint doi: 10.17605/osf.io/cjsk2

Crutzen, R., Peters, G.-J. Y., & Noijen, J. (2018). Using Confidence Interval-Based Estimation of Relevance to Select Social-Cognitive Determinants for Behavior Change Interventions. Frontiers in Public Health 5:165. http://dx.doi.org/10.3389/fpubh.2017.00165

Crutzen, R. (2014). Time is a jailer: what do alpha and its alternatives tell us about reliability? The European Health Psychologist, 1(2), 70-74.

Crutzen, R., & Peters, G.-J. Y. (2015). Scale quality: alpha is an inadequate estimate and factor-analytic evidence is needed first of all. Health Psychology Review. doi: 10.1080/17437199.2015.1124240

Verboon, P. & Peters, G.-J. Y. (2018). Applying the generalized logistic model in single case designs. PsyArXiv. Preprint doi: 10.17605/osf.io/ad5eh

See Also

psych and MBESS contain many useful functions for researchers in psychology.

Examples

Run this code
# NOT RUN {
### Create simple dataset
dat <- PlantGrowth[1:20,];
### Remove third level from group factor
dat$group <- factor(dat$group);

### Examine normality
normalityAssessment(dat$weight);

### Compute mean difference and show it
meanDiff(dat$weight ~ dat$group, plot=TRUE);

### Show the t-test
didacticPlot(meanDiff(dat$weight ~ dat$group)$t,
             statistic='t',
             df1=meanDiff(dat$weight ~ dat$group)$df);

### Load data from simulated dataset testRetestSimData (which
### satisfies essential tau-equivalence).
data(testRetestSimData);

### Select some items in the first measurement
exampleData <- testRetestSimData[2:6];

# }
# NOT RUN {
### Show reliabilities
scaleStructure(dat=exampleData, ci=FALSE,
               omega.psych=FALSE, poly=FALSE);
# }
# NOT RUN {
### Show item distributions and means
meansDiamondPlot(exampleData);

### Create a dichotomous variable
exampleData$group <- cut(exampleData$t0_item2, 2);

### Show a dlvPlot
dlvPlot(exampleData, x="group", y="t0_item1");

### show a dlvPlot with less participants, showing the confidence
### interval and standard error bars better
dlvPlot(exampleData[1:30, ], x="group", y="t0_item1");

# }

Run the code above in your browser using DataLab