elduvelle, (edited )
@elduvelle@neuromatch.social avatar

As a (broadly-speaking), which language do you prefer for your data processing and data analysis?

I’m particularly interested in understanding why so many people seem to use R these days - comments welcome!

#R

roaldarboel,
@roaldarboel@neuromatch.social avatar

@elduvelle I use Python for everything but data analysis: Serial communication for interacting with hardware, GUI development, command line tools etc.
R is still unrivalled in the stats section. Anything modelling, it’s got you covered with well-documented packages from generalised mixed models, Bayesian models, change-point models, additive models. It’s all there, and accompanies the papers in which those methods are introduced - it’s bleeding edge stats. Oh, and then tidyverse, including ggplot of course.
But there’s also another component: In many degrees R is taught in the intro to stats courses, making it the first programming language one encounters. I was taught R in my Sports Science Bsc, I teach it to ecology and conservation students. I since learned other languages, but R is like coming home☺️ What I miss is good GPU support for pytorch-like processing though…

keturah,

@elduvelle I liked using Matlab for a lot of data processing, particularly n-dimensional data where n>=3 or the data was really big (hours of millisecond-samples). Then after processing I used R for easier statistical modeling and for ggplot2. But eventually I moved everything into Python, which is my main tool now, though I'm no longer in cogsci. I'm happy with SciPy and matplotlib!

pglpm, (edited )
@pglpm@emacs.ch avatar

@elduvelle I have been using #R for data analysis and especially inference in neuroscience, medicine, and a couple of other fields. Some reasons why I don't or can't use specifically:

  • There are no python packages for non-parametric frequency/density inference, that is, inference where you are not assuming any parametric dependence, and in fact not even a functional dependence (as deep networks or Gaussian processes do instead, for example). Monte Carlo sampling is very important for this. R offers many great packages for this, especially
  • Working with R I only need to keep one version of the software and packages: the latest. Python is a headache with all the versions one must keep.
  • I find python's syntax illogical and clumsy compared to R's – but obviously this is completely subjective.
elduvelle,
@elduvelle@neuromatch.social avatar

@pglpm that’s super useful, thanks!

jonny,
@jonny@neuromatch.social avatar

@elduvelle
Im primarily a python programmer but do most of my data analysis in R - the tidyverse and ggplot are absolutely lovely tools built in a charmingly cursed language

kinleyid,

@elduvelle For processing, Python wins because of all the specialized libraries (e.g., MNE for EEG data), but for statistical analysis, R will always reign supreme

elduvelle,
@elduvelle@neuromatch.social avatar

@kinleyid so you use both?
Is it that there are stat things that you can do in R that you can’t do in Python? (Which ones?) or is it that some stat things are simpler / easier in R? (For example?)

kinleyid,

@elduvelle Yes, both! Matlab too actually, but less often.

I guess the big advantage of R is that it was built for stats from the start. The fact that dataframes and formulas are basic data types in the language makes everything straightforward. If I hear of a new stats technique, I know there will be an R package for it that will probably use familiar syntax, whereas neither feels guaranteed in Python. What about you, what do you use?

elduvelle, (edited )
@elduvelle@neuromatch.social avatar

@kinleyid I’ve been been using Python and Matlab, I’ve usually found that you I can do all the stats I need in either of these, maybe just once I had to use a Matlab function for a test that wasn’t implemented in Python.
I followed some lectures on R and found it really confusing… but it was a long time ago.

Would you have an exemple of test that is implemented in R but not in the other languages?

kinleyid,

@elduvelle Yes, R can definitely be confusing. I only learned it because I was so determined after Matlab told me I'd need to pay to do a t test.

An example: R's OpenMx seems to be able to do multilevel structural equation modeling, whereas a quick google search didn't return any equivalent Python library.

jonny,
@jonny@neuromatch.social avatar

@kinleyid
@elduvelle
Probably dating myself, does python have a good multilevel modeling tool like lme4?

kinleyid,

@jonny @elduvelle Surely, right? I'm actually not certain

eliasraw,

@kinleyid @elduvelle @jonny

The python statsmodels package offers some multilevel modeling functions: https://www.statsmodels.org/stable/index.html

jonny,
@jonny@neuromatch.social avatar

@eliasraw
@kinleyid @elduvelle
That looks great! Cheers to whoever made that :)

kinleyid,

@elduvelle Anyway, this isn't to dismiss Python! I just find that R has everything I need statswise :)

elduvelle,
@elduvelle@neuromatch.social avatar

@kinleyid thanks for your input! Definitely very useful! It looks like in my case I just don’t use sophisticated enough stats to need it…

kinleyid,

@elduvelle In fairness, I haven't used OpenMx myself haha

eric_ma,
@eric_ma@techhub.social avatar

@elduvelle I am not a Neuroscientist but I do both and with Python and Pandas.

elduvelle,
@elduvelle@neuromatch.social avatar

@eric_ma Cool, and thanks for answering! What kind of data do you analyze?

eric_ma,
@eric_ma@techhub.social avatar

@elduvelle Mostly financial data. What I like the most is that I can manipulate data in many different ways.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • python
  • kavyap
  • InstantRegret
  • mdbf
  • ngwrru68w68
  • khanakhh
  • DreamBathrooms
  • Durango
  • magazineikmin
  • thenastyranch
  • everett
  • Youngstown
  • slotface
  • rosin
  • modclub
  • JUstTest
  • cisconetworking
  • osvaldo12
  • tacticalgear
  • tester
  • GTA5RPClips
  • cubers
  • ethstaker
  • provamag3
  • normalnudes
  • anitta
  • Leos
  • megavids
  • lostlight
  • All magazines