logo

Tag : R

How to set up Repeated-Measures Regressions in R

We analyze within-subjects designs with repeated-measures regressions, aka random-effects models. Learn how to set up such models in R. This concerns analyzing data with grouping, clustering, aka. hierarchical data, data with correlated errors, or data with violations of sphericity.

How to create R-Packages

Do you need some functions over and over again? Tired of sourcing them to multiple projects? Wrap functions in an R package (Windows)

Inter-rater reliability for unequal raters per item: Fleiss-Cuzick’s kappa

Inter rater reliability If you want to obtain inter-rater reliability measures for dichotomous ratings, by more than two raters, but not all raters rated all items, Fleiss and Cuzick (1979) will be the referece you’ll find. For example, we asked researchers which model they consider a process model (dichotomous rating), and we asked about 60 researchers (more than two rater), of whom not everyone was familiar with every model (not all raters rated all items). They proposed a measure between […]

R does not round 2.5 to 3

In R’s default round() functions, odd numbers ending with .5 are rounded up (1.5 becomes 2), but even numbers are rounded down (2.5 becomes 2, rather than 3). This is compliant with a norm on rounding as outlined in the R documentation, but sometimes inconvenient.

Save parameters and seeds of simulations

Today, Robert posted the nice idea to save seeds of simulations. He recommends storing seeds with results, alternatively, store seeds with starting parameter values if you run numerical optimization. It is also useful to create an external file which stores parameters and seeds with a unique identifier which one can use for naming results folders and file organization. Th is post contains a code to do the latter.