An R SAFAQ


Using this “Rblog”

At the top you should find a search box and a menu. Probably the best way to find if I have something you want here is to use that search. However, you may also find things using the “CATEGORIES” menu on the right of this main page.

Going back to the top right of the menu bar “Welcome” gives you a bit more than this introduction, “About” gives you some geeky background and you can guess what “Copyright/permissions” gives you. I hope it’s all useful, do please contact me if you have suggestions, comments, corrections or requests.

What follows below is the full list of posts in reverse chronological order of creation. Code used in the posts is in them and revealed by hitting the “Show code”, buttons. Inside code blocks there is a “copy to clipboard” button if you hover your cursor inside the block.

An R SAFAQ

League tables

Ranking

Illustrating the need to be wary of league tables

F-measure: 'positive specific agreement' index

Agreement
Cohen's kappa
Demonstration

Illustrates that the Cohen's kappa converges on the F-measure as d increases

Mapping dates to episodes

R programming
R tricks
Tidyverse

Illustrates how to use join_by() in tidyverse R to do this.

Autocorrelation (1)

Correlation
Time series

Reminding myself about autocorrelation methods.

Dichotomisation (1)

Simulation
Correlation
Transformations

Illustrates the impact of dichotomising a continuous variable on correlations with other variables.

Using simulation to check a function

Simulation
CECPfuns package
p values
Reliability

Illustrates using simulation to check my function based on a 1969 paper.

Bug in facetted ggplot with coord.fixed()

Graphics
R graphics
R markdown
R tricks

I think this is a bug, others disagree!

Percentage of possible score range

Psychometrics
Correlation
Transformations
Standardising

This explains why this transform can be misleading.

Convergent validity issues (1)

Psychometrics
Correlation
n=1

This expands the glossary entry about convergent validity

Dispersion

R tricks
Distributions
Gaussian distribution

Post that will link closely to glossary entries and shiny apps all about dispersion, scatter, variance

Anonymising ODT and DOCX documents

Geeky stuff

Anonymising Libre/OpenOffice ODT and M$oft Wurd DOCX documents

CSC by gender and age

RCSC paradigm
CECPfuns package

CSC matching lookup with lookupCSCgenderAndAge()

Hedges's g

Effect sizes

A bit about Hedges's g!

Correlation coefficients (2)

Correlation
Null hypothesis tests (NHSTs)

Significance testing and confidence intervals for correlation coefficients ... and back to why!

Correlation coefficients (1)

Correlation
Null hypothesis tests (NHSTs)

Exploration of the differences between different correlation coefficients.

Bonferroni correction

Multiple tests problem
Simulation
Null hypothesis tests (NHSTs)

A simple explanation of the Bonferroni correction for the multiple tests problem.

Confidence interval around Spearman correlation coefficient

CECPfuns package
Correlation
Confidence intervals
Non-parametric statistics
Rank methods

Explores four methods of estimating a CI around an observed Spearman correlation.

Explore distributions with plots

R tricks
R graphics
Distributions
Null hypothesis tests (NHSTs)
Gaussian distribution
Plots and graphs

Graphical exploration of fit between distributions and against theoretical distributions.

Tests of fit to Gaussian distribution

R tricks
Distributions
Distribution tests
Null hypothesis tests (NHSTs)
Gaussian distribution

Introduction to four tests of fit to Gaussian distribution available in R

Kolmogorov-Smirnov test

R tricks
Distributions
Distribution tests
Null hypothesis tests (NHSTs)
Gaussian distribution

First post about using R to test fit to univariate Gaussian (a.k.a. 'Normal') distribution: Kolmogorov-Test

Using tryCatch() (within simulations)

R tricks
R programming
Simulation

I had previously found the structure of tryCatch() difficult: cracked it!

Background on plotJacobson() function

RCSC paradigm
Jacobson plot
CECPfuns package
Plots and graphs

1.xi.23 This is very early work in progress and will evolve a lot over the next week and then get into CECPfuns R package on github.

Confidence intervals for quantiles

Confidence intervals
ECDFs
Quantiles (quartiles, [per]centiles, deciles)

A general coverage of quantiles, the ECDF (Empirical Cumulative Distribution Function) and confidence intervals (CIs) around quantiles

Mapping individual scores to referential data using quantiles

Confidence intervals
ECDFs
Quantiles (quartiles, [per]centiles, deciles)
Mapping to referential data

Exploring the use of quantiles and their confidence intervals, and ECDFs to map individuals' scores to referential data.