Programming in R and Shiny
Martin Losert, Katharina Naumann, Florian Wickelmaier
R is a widely used programming language for data analysis and statistical computing. This course will recapitulate basic data structures and programming concepts in R and focus on applications of statistical modeling and simulation-based inference. Participants will learn how to use R for parameter estimation, hypothesis testing, and power analysis.
Shiny is an add-on package for R that makes it easy to create interactive web pages. Participants will learn how to program their own Shiny app in R, to customize its appearance, and to control how it reacts to user input.
- R, follow the instructions on the R web page, https://www.r-project.org/
- Shiny, type into the R console: install.packages("shiny")
- RStudio (optional), follow the instructions at the RStudio web page, https://www.rstudio.com/products/rstudio/
- Dalgaard, P. (2008). Introductory Statistics with R, 2nd edition. Springer. ISBN 978-0-387-79053-4, http://staff.pubhealth.ku.dk/~pd/ISwR.html
- Shiny Tutorial, https://shiny.rstudio.com/tutorial/
Representational Measurement Theory
In 1960 Eugene Wigner, who received the Nobel prize in physics shortly after, published a paper on “the unreasonable effectiveness of mathematics in the natural sciences”. It seemed a mystery to him that the abstract mathematical structure of the real numbers is useful for capturing empirical phenomena. About the same time a group of psychologists started out to answer the question of how numbers enter into science, or, to put it differently, what it means to measure something. By clarifying the notion of measurement and making explicit the empirical assumptions it is based on,
they contributed to demystifying the “the unreasonable effectiveness of mathematics in the natural sciences”. The course provides a basic introduction into representational measurement theory. It discusses examples of psychological measurement such as ordinal measurement, Guttman scaling, and conjoint measurement, and showcases their application in various contexts.
Planning and Analysis of Interventional Studies
Using examples from clinical studies in psychology and medicine, we review the basic study design in clinical trials, including statistical tests and sample size planning. Step by step we learn how to extend the methodology to adjust for baseline performance, to analyze subgroups, to do interim analyses, to test for equivalence instead of difference, to deal with missing data, to deal with multiple outcome variables, to analyze binary data, count data, and event times, to deal with clustered data (e.g. group therapy), and to compare natural (i.e., not randomized groups). In the end, students will be able to plan and analyze of standard study designs in real world-settings, including basic preprocessing of data, import and export of different files, and standardized reporting.
Numerical Methods for Statistical Inference
Numerical problems are frequently encountered by quantitative psychologists. Prominently, the estimation
of the parameters of a statistical model requires the solution of an optimization problem. In
a few simple cases, closed-form solutions exist but for many, more interesting, models the optimal
parameter estimates have to be determined by means of an iterative algorithm. The goal of this lecture
is threefold. First, we want to offer an overview of some basic numerical methods in quantitative
psychology (e.g., steepest descent, Newton-Raphson). This will be done by elaborating some basic
tools such as Taylor series expansion and the geometric interpretation of the gradient and Hessian.
Second, we want to provide a framework for understanding the connections among several optimization
algorithms as well as between optimization and aspects of statistical inference. Third, we want
to offer theoretical insight as well as hands-on experience in R.