Programming

Programming related posts

In this category you will find posts that are related to programming and should be interesting for psychologists, cognitive scientists, and neuroscientists. Well, almost every researcher would probably find some of the information useful at some time!

Every research psychologist, cognitive scientist, and neuroscientist, should know how to program.. Knowing how to program and write scripts will make many of a researchers everyday tasks much easier. For instance, instead of going through line after line of raw data you can write a Python script that runs through each cell in each column. Furthermore, you get the possibility to use more advanced, and cutting edge, statistical techniques by using R statistical programming environment.

Another example might be to create experiments using PsychoPy (either by coding using Python or using the drag-and-drop interface) and the cheap and open-source Arduino microcontroller. Also, coding is fun and relaxing!

How to Create Dummy Variables in R (with Examples)

In this tutorial, we will learn how to create dummy variables in R. Now, creating dummy/indicator variables can be carried out in many ways. For example, we can write code using the ifelse() function, we can install the R-package fastDummies, and we can work with other packages and functions (e.g. model.matrix). In this post, however, […]

How to Create Dummy Variables in R (with Examples) Read More »

How to Import Historical Stock Prices Into A Python Script Using the IEX Cloud API

Python is one of the world’s most popular programming languages. Specifically, Python for finance is arguably the world’s most popular language-application pair. This is because of the robust ecosystem of packages and libraries that makes it easy for developers to build robust financial applications. In this tutorial, you will learn how to import historical stock

How to Import Historical Stock Prices Into A Python Script Using the IEX Cloud API Read More »

Create a Correlation Matrix in Python with NumPy and Pandas

In this post, we will calculate a correlation matrix in Python with NumPy and Pandas. Now, there will be several Python correlation matrix examples in this tutorial. First, we will read data from a CSV file so we can simply have a look at the numpy.corrcoef and Pandas DataFrame.corr methods. Now, building a correlation table

Create a Correlation Matrix in Python with NumPy and Pandas Read More »

Scroll to Top