r/statistics • • Apr 14 '26

Software [S] PROC SQL in SAS is Goated

19 Upvotes

I am working on a project for a stat programming course and I am realizing just how amazing PROC SQL is in SAS. For those of you who have SAS experience, you might know what I mean. Here is an example of why this is the case:

I am doing a project based on ratings for a movie-ratings website. Without PROC SQL, I would have to use a PROC MEANS, PROC SORT and PROC PRINT just to display top movies based on average ratings. With PROC SQL, I can do this in a single PROC step.

Wanted to know if anyone else has experienc with something like this.

r/statistics • • Jun 19 '26

Software [S] Mplus "student discount" ends up costing more than a regular license

31 Upvotes

Rant, delete if not allowed.

I am in a PhD program and trying to use Mplus for my dissertation research. I went to buy a license today. I knew that to get the latest version and support, Mplus requires an annual subscription for which it charges back payments; meaning that if you don't access updates or support for a few years, you have to pay all the missing years of support plus a penalty in order to reinstate updates and support. This is already kind of ridiculous, because they're charging you for years you did not access support, and therefore cost the company anything. It would be more reasonable to charge an upgrade fee to get the latest version imo. But whatever, that's not too big of a deal because on their own website they suggest just buying a new license if the back payments add up to more than a new license. Okay, well they're still greedy but at least they essentially cap the max payment for access at the new license fee, so at least that's something.

Except when I go to buy a new student license using my university email, which is necessary to get student pricing, the website tells me I already have a license. The license is from 2021, when I used Mplus for a course, so by now the back payments and penalty are $630. I think, okay, well I'll just get a new license like their own website recommends. Except nope, the website says that because I am a student, I must renew the same license. They have paperwork I would have signed in 2021 stating that I agree I will have to pay all the back payments and penalty if I ever want to renew. So they want me to pay $630, when a new student license costs $195 and a non-student university license is $595, all for the crime of... using it intermittently? taking an SEM course when I didn't have an immediate use for SEM at that time? using exactly 0 support hours over the past 5 years?

It really pisses me off that this is explicitly a student pricing policy. They cap other users' costs at the price of a new license, but for students, who they clearly understand to be financially limited, they have this gotcha that wipes out the benefit of the student license over the period of time most people take to get through a PhD program.

I'm going to see if I can get away with the non-updated version for now, and after my dissertation I stg I am never opening this overpriced-to-hell program and its 1992-ass UI ever again.

r/statistics • • Aug 24 '26

Software [Software] How to test if your numerical code is mathematically correct?

18 Upvotes

I contribute to SciPy and kept running into a class of bug that annoys me: the outputs look plausible, the tests pass, but the equation the code implements is subtly wrong. So I've been building a tracer that runs Python/NumPy code and hands back whatever mathematics it actually computed, as a SymPy expression you can simplify or differentiate like anything else.

It's been more useful than I expected. Comparing an implementation against the formula in a paper, catching two functions that agree on my test data but turn out to compute different things, digging up the inputs my tests never hit (ties, zero denominators). It traces real library code too, most of numpy and a good chunk of scipy, scikit-learn, statsmodels, cvxpy.

Write-up: https://medium.com/@aadyachinubhai/scikit-verify-translate-python-numpy-programs-to-symbolic-mathematics-c664d41ba571

Github: https://github.com/aadya940/scikit-verify

Still rough in places, would genuinely like feedback. There may be other better solutions, happy to hear them as well!

r/statistics • • 4d ago

Software [Software] SimtablR: Quick and Easy Epidemiological Tables, Diagnostic Tests, and Multi-Outcome Regression - version 3 now available on CRAN!

13 Upvotes

🎞Watch the short demo here: https://www.reddit.com/r/RStudio/s/K88EvqP6EC

Hello everyone! After 8 months (of rather sporadic) work, I am really excited to share the biggest update to SimtablR, an R package designed to streamline the most common analytical tasks in epidemiology and clinical research! (short demo video above)

I do epidemiological research in R, and I kept juggling multiple packages and repeating work just to get tables that were actually informative and ready for a paper. I also found that base R tabulation left a lot to be desired in terms of formatting, but gt_summary was a bit too slow and had a lot of boilerplate. This package is also great for people transitioning from Stata or still learning R!

With this new release, SimtablR now covers most of a typical analysis, from the first cross-table to the finished table in a Word document:

1. tb(): quick, but powerfull tabulation with formatting

  • Row/col/total percentages with simple flags (row, col, cell) and adjustable decimals
  • Hypothesis tests with one argument (N-1 chi-squared, Fisher when needed, etc.)
  • Prevalence ratios, risk ratios or odds ratios with 95% CIs, directly in the table
  • SimtablR now picks the right measure (RR, OR or PR) automatically for a stated study design (design = "cohort", "case_control", "cross_sectional")
  • New: stratified analysis with Mantel-Haenszel pooled estimates

2. table1(): baseline tables of multiple variables (literally the "table 1")

  • Automatically chooses mean (SD) or median (IQR) based on each variable’s distribution
  • Reports missing data per variable and group
  • Add standardized mean differences with test(smd = TRUE)
  • Completely customizable and exportable to all office programs

3. diag_test() and roc(): diagnostic accuracy

  • Automatically calculates the confusion matrix, sensitivity, specificity, PPV, NPV, LR+, LRβˆ’ and accuracy, with exact (Clopper-Pearson) CIs
  • New: roc() now gives the AUC with DeLong CIs and the Youden-optimal threshold

4. regtab() and survtab(): regression

  • Fits multiple outcomes at once and returns a single publication-ready table
  • Does adjusted risk ratios via log-binomial regression (with robust Poisson fallback), robust variance, and Firth regression for rare events
  • New: survtab() for Cox models and hazard ratios
  • New: autoplot() draws forest plots from any model

5. Reporting and export (new!)

  • simtablr() builds Table 1 + Table 2 (crude and adjusted) as a single report which you can then send to word or excell or powerpoint
  • as_methods() drafts the statistical methods paragraph from what you actually did with the variables you chose!
  • export_docx() / export_xlsx() send everything to Word or Excel
  • Journal styles (style("jama"), "nejm", "lancet") or your own with journal_style(), down to the Word table theme. Restyling never changes the underlying numbers and you can use the sabe object for new analysis, even after styling!

6. Statistical guidance (new)

SimtablR prints short notes (with references) when something deserves attention. Examples: an odds ratio with a common outcome, unadjusted p-values, or when the distribution of your variable violates an assumption from the model you're running. It should just tell you.

The package includes epitabl, a ynthetic cohort of 1,500 patients, so you can replicate the examples of the video

Links:
πŸ“¦ Documentation: https://matheustg-14.github.io/SimtablR/
πŸ“„ Getting started: https://matheustg-14.github.io/SimtablR/articles/getting-started.html
πŸ› GitHub (issues & feature requests): https://github.com/MatheusTG-14/SimtablR

Thanks to everyone who gave feedback on the first version! I’d love to hear what you think, what’s missing from your workflow, and any bugs you find on GitHub.

r/statistics • • May 06 '25

Software [S] How should I transition from R to Python?

60 Upvotes

I'm a current PhD student and I did most of my undergrad using R for statistics. I need to learn some Python over the summer for some projects though. Where is a good place to start? I'm hoping there are resources for someone who already knows how to code/do statistics in general but just wants to transfer the skills.

Also, I'm used to R Studio, is there an equivalent for Python? What do you guys use to write and compile your Python code? Any advice is greatly appreciated!

r/statistics • • May 24 '26

Software [S] lme4 now allows users to specify structured covariance matrices

103 Upvotes

I figure this might be of interest to some.

Under New Features for version 2.0.1

NEW FEATURES

by longstanding request, lme4 now allows users to specify structured covariance matrices, by tagging the covariance term (e.g. cs(1 + f | g) fits a compound symmetric covariance matrix, diag(...) fits a diagonal covariance matrix). See ?"Covariance-class" or vignette("covariance_structures", package = "lme4") for more detail

https://lme4.r-universe.dev/lme4/NEWS

Also, see "Covariance Structures" at

https://lme4.r-universe.dev/articles/lme4/covariance_structures.html

r/statistics • • 9d ago

Software New release of anvl [S]

Thumbnail
2 Upvotes

r/statistics • • 20d ago

Software Bootstrapping in emmeans [software]

Thumbnail
1 Upvotes

r/statistics • • Jan 11 '26

Software [Software] How good are you at guessing correlation from scatterplots?

95 Upvotes

r/statistics • • Jul 11 '26

Software [S] I made a Python package for rejection sampling

24 Upvotes

Hi guys, I'm a master's student in Statistics, and I recently published my first Python package.

rejection-sampler (my package) verifies rejection sampling setups and calculates the optimal rejection constant (M).

Despite being a simple algorithm, rejection sampling requires choosing a proposal distribution and a constant M such that f(x) ≀ M g(x) over the target support, which can be tedious and/or error-prone. That's exactly what my package automates.

Example use cases:

  • Validate that a proposal distribution satisfies the rejection sampling condition given a target distribution.
  • Compute the smallest valid rejection constant (M). (which means a more efficient sampling)

If you'd like to give it a try, you can install it with `pip install rejection-sampler`.

For more details and examples:

PyPI: https://pypi.org/project/rejection-sampler/

GitHub: https://github.com/HankTaiwan869/rejection-sampler

This started as a final project for my Statistical Computing course, so I'm sure there are things that could be improved upon. I'd love to hear any feedback or know if anyone finds it useful. Thanks!

r/statistics • • Aug 16 '26

Software [S] Affordable software for running a conjoint survey?

Thumbnail
2 Upvotes

I'm looking for recommendations for affordable software to run a conjoint survey. I’ve looked at some of the major conjoint platforms, but their pricing is way too high for what I need.

I don’t need a huge enterprise package. I’m mainly looking for something that can set up a solid conjoint experiment, collect responses, and ideally handle the basic analysis.

Has anyone used a cheaper platform or tool that they’d recommend? Open-source or academic-friendly options would also be great.

Thanks!

r/statistics • • Aug 06 '26

Software [S] New Python package survival analysis/survival curves: SurvivalPredict

12 Upvotes

A friend of mine made this software and I thought this might be a good place to post it They don't really use reddit and new accounts aren't allowed here so I'm posting on their behalf. The rest of the text is theirs.

Hi everyone, I recently published a new Python package for survival analysis/survival curves called β€˜survivalpredict’. It is largely born out of our personal frustration with the existing Python survival analysis packages (lifelines/scikit-survival), which have different goals. My focus is on evaluating survival models directly on survival curves (via Brier scores) instead of relative ranking (c-index), and on easily cross-validating models using Brier scores.

I would love it if some of you could give it a try and give some feedback.

Cheers!

PyPI: https://pypi.org/project/survivalpredict/

GitHub: https://github.com/pr38/survivalpredict

ReadtheDocs: https://survivalpredict.readthedocs.io/en/latest/

r/statistics • • Apr 19 '18

Software Is R better than Python at anything? I started learning R half a year ago and I wonder if I should switch.

139 Upvotes

I had an R class and enjoyed the tool quite a bit which is why I dug my teeth a bit deeper into it, furthering my knowledge past the class's requirements. I've done some research on data science and apparently Python seems to be growing faster in the industry and in academia alike. I wonder if I should stop sinking any more time into R and just learn Python instead? Is there a proper GGplot alternative in Python? The entire Tidyverse package is quite useful really. Does Python match that? Will my R knowledge help me pick up Python faster?

Does it make sense to keep up with both?

Thanks in advance!

EDIT: Thanks everyone! I will stick with R because I really enjoy it and y'all made a great case as to why it's worthwhile. I'll dig into Python down the line.

r/statistics • • Jun 12 '20

Software [S] Code for The Economist's model to predict the US election (R + Stan)

229 Upvotes

r/statistics • • Dec 22 '25

Software [S] Statistical programming

17 Upvotes

Data science student here (year 2/4). I recently developed an interest in the concept of statistical programming, and would like to explore more about it. As of this moment, I am quite familiar with python, know nothing of R and very very little SAS. What do you suggest I should take as the next step? If I were to start some portfolio work, what is the ideal place to look for questions/projects/datasets?

any help would be appreciated, thank you!

r/statistics • • Jun 22 '26

Software [Software] Regression without leaving SQL: lm + an R-style formula

1 Upvotes

r/statistics • • May 23 '26

Software [Software] lessR Reviews?

0 Upvotes

Hi all,

I'm curious if anyone has used lessR before and what your thoughts are. I can't seem to find anything on it other than the official website. No reviews, complaints, praise, or anything. Not even entirely sure if it's a statistics program or not. Please point me in the right direction if you know where I should post this. It seems to be a more coding-intense method for forecasting and reading statistics, in comparison to Excel which is much more common.

So, have you used lessR? What are your thoughts?

Thanks in advance!

r/statistics • • Jun 10 '26

Software [S] I built a Manim extension for animated statistics β€” distributions, probability, inference and more

15 Upvotes

Static diagrams never built real intuition for me, so I built statanim β€” a Python library that extends Manim Community specifically for statistics.

Instead of writing hundreds of lines of geometry code, you get statistical objects and animations as first-class Manim extensions β€” distributions, probability trees, inference visualisations, regression surfaces, physical props (cards, dice, urns) and more.

Animated demos of Sample Space, Classical Probability, Conditional Probability, Hypergeometric Distribution and the Birthday Paradox are all in the README.

Install: pip install statanim

GitHub: https://github.com/rishabhbhartiya/STATANIM

PyPI: https://pypi.org/project/statanim/

Happy to answer any questions!

r/statistics • • Dec 04 '25

Software A wordle-like game, but based on stats! [Software]

65 Upvotes

Guess today's country!Β https://joewdavies.github.io/statle/

All opensource, no ads or cookies.

r/statistics • • Jan 02 '26

Software [S] I built an open source web app for experimenting with Bayesian Networks (priors.cc)

35 Upvotes

I’ve been studying Bayesian Statistics recently and wanted a better way to visualize how probability propagates through a system. I found plenty of "ancient" windows-only enterprise software and Python libraries, but I am on a Mac and wanted something lightweight and visual to build my intuition, so I builtΒ PriorsΒ (hosted atΒ priors.cc).

It’s a client-side, graph-based editor where you can:

  • Draw causal DAGs
  • Define Conditional Probability Tables
  • PerformΒ Exact InferenceΒ in real-time. It usesΒ Joint Probability Enumeration, which afaik is the naive one but least scalable method of Bayesian Inference.
  • Set evidence (observe a node) and watch the posterior probabilities update instantly.

I've built this using AI assistance (AI Studio) to handle the React boilerplate and HTML, while I focused on verifying the inference logic against standard textbook examples. It currently passes the test cases (like the "Rain/Sprinkler" network and the "Diseasitis" problem from LessWrong), but I am looking for feedback on edge cases or bigger networks,I guess it will crash with 20+ nodes?

I’m sharing it here in case anyone finds it useful for teaching, learning, or quick modeling.

The source code is open (MIT) and available here:https://github.com/alesaccoia/priors

I’d love to hear if you manage to break it, wanna contribute, or just like it!

r/statistics • • Jun 14 '26

Software [S] Premier League and World Cup forecasting model using Elo ratings + Monte Carlo simulation

0 Upvotes

Hi everyone,

I'm a high school student interested in statistics and sports analytics. I built MultiForecast, a soccer forecasting platform that uses Elo ratings and Monte Carlo simulation to estimate title, top-4, and relegation probabilities throughout the premier league season and now for the world cup.

I'm looking for feedback on:

  • Model calibration
  • Evaluation metrics
  • Potential improvements beyond Elo
  • Any statistical pitfalls I may be overlooking

App: https://multiforecast.streamlit.app/

GitHub: https://github.com/kevzho/MultiForecast

I'd appreciate any thoughts or criticism!

r/statistics • • Jan 08 '24

Software [S] New Student of R - Jupyter or RStudio?

22 Upvotes

Hi people

​

I'm currently revisiting statistics using R. As a strong Excel user with past experience in EViews, I'm now focusing on R for my courses. One habit that is crucial to my learning process is making extensive digital notes. I've found that RStudio's lack of formatted comments is a bit limiting, especially for inline notes that I refer back to while coding.

I'm considering switching to Jupyter for this reason and am wondering if it would be a better fit for my needs. Could anyone share insights on whether Jupyter's capabilities for note-taking and formatting would be more advantageous for a student like me? Additionally, are there any significant differences between Jupyter and RStudio that might impact my learning experience in R?

Thanks in advance for your advice!

r/statistics • • Mar 01 '26

Software [S] Need advice on software expectations

2 Upvotes

Hi everyone,

I’m in the process of applying for a PhD and have started working on a paper with my prospective supervisor. He suggested using software like Mplus or HLM for the analysis.

The issue is that these programs are quite expensive, and I currently don’t have institutional access. I have prior experience with SPSS and am learning R (especially for multilevel modeling and SEM). I mean for sure he is testing my statistical skills and also he said that as English is not his 1st language so we should communicate more on text as it can be from my end or his end or we both are making it hard to understand each other. Is it normal?

I’m feeling a bit anxious about whether not having Mplus/HLM access might reflect poorly on me. Is it generally expected that students purchase these themselves? Would using R be considered acceptable in most cases?

Would really appreciate hearing others’ experiences especially from PhD students or those who’ve worked with multilevel/SEM analyses.

Thanks in advance!

r/statistics • • Jan 02 '26

Software [S] One-click A/B test checker as a Browser Bookmark

0 Upvotes

r/statistics • • Nov 20 '25

Software [S] Lace v0.9.0 (Bayesian nonparametric tabular data analysis tool) is out and is now FOSS under MIT license

27 Upvotes

Lace is a tool for tabular data analysis using Bayesian Nonparametric models (Probabilistic Cross-Categorization) in both rust and python.

Lace lets you drop in a dataframe, fit a Bayesian model, then start asking questions.

``` import pandas as pd import lace

Create an engine from a dataframe

df = pd.read_csv("animals.csv", index_col=0) animals = lace.Engine.from_df(df)

Fit a model to the dataframe over 5000 steps of the fitting procedure

animals.update(5000) ```

Predict things and return epistemic uncertianty

``` animals.predict("swims", given={'flippers': 1})

Output (val, unc): (1, 0.09588592928237495)

```

evaluate likelihood

``` import polars as pl

animals.logp( pl.Series("swims", [0, 1]), given={'flippers': 1, 'water': 0} ).exp()

output:

shape: (2,) Series: 'logp' [f64] [ 0.589939 0.410061 ] ```

simulate data

``` animals.simulate( ['swims', 'coastal', 'furry'], given={'flippers': 1}, n=10 )

output:

shape: (10, 3) β”Œβ”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β” β”‚ swims ┆ coastal ┆ furry β”‚ β”‚ --- ┆ --- ┆ --- β”‚ β”‚ u32 ┆ u32 ┆ u32 β”‚ β•žβ•β•β•β•β•β•β•β•ͺ═════════β•ͺ═══════║ β”‚ 1 ┆ 1 ┆ 0 β”‚ β”‚ 0 ┆ 0 ┆ 1 β”‚ β”‚ 1 ┆ 1 ┆ 0 β”‚ β”‚ 1 ┆ 1 ┆ 0 β”‚ β”‚ ... ┆ ... ┆ ... β”‚ β”‚ 1 ┆ 1 ┆ 0 β”‚ β”‚ 1 ┆ 1 ┆ 0 β”‚ β”‚ 1 ┆ 1 ┆ 1 β”‚ β”‚ 1 ┆ 1 ┆ 1 β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜ ```

and more.

Other than updating the license, we've allowed categorical columns to have more than 256 unique values and made some performance improvements to some of the MCMC kernels.