Stefan Hansen

@stefanforfan.bsky.social

Associate professor in biostatistics at Aarhus University https://github.com/snhansen

I've made my first R package {ciwidth}. It's nothing big, but it lets you calculate the sample size needed for obtaining a confidence interval for a mean or mean difference with a certain width with a given probability. Take a look here: github.com/snhansen/ciw... #rstats #statssky

GitHub - snhansen/ciwidth: Sample size calculations based on confidence intervals

Sample size calculations based on confidence intervals - snhansen/ciwidth

github.com

I did update the figure a bit and added labels, but it probably works better as sequential slides in a presentation. If you want the code and the pptx just drop me a dm and I’ll send it all your way.

Bild

With respect, this suggests quite a serious misunderstanding about why we randomise. We do this to ensure imbalances are random. Our analyses treat them as such, and ensure valid inference. The problem here is with the idea that point estimates are useful, rather than with randomisation.

To new users and followers: Here's a Shiny app showing the differences between three ways of including a continuous covariate in linear regression models. Feel free to use it in your teaching or elsewhere! #rstats #datascience #statssky #stats #epi #episky

Stefan Hansen@stefanforfan.bsky.social · 3y ago

I made a Shiny app to showcase the differences between using a linear fit, a categorical fit and a (restricted cubic) spline fit under various data generating mechanisms. The app is available at: apps.biostat.au.dk/stefan/splin... Feel free to use it in your teaching #rstats #datascience #statssky

With the recent influx of new users, I wanted to repost some of my Shiny apps that might be helpful to others. Feel free to use them in your teaching or other projects! #rstats #datascience #stats

Stefan Hansen@stefanforfan.bsky.social · 3y ago

My students often struggle with selection and measurement error bias in linear regression models, so I have made two Shiny apps to help visualize these concepts: apps.biostat.au.dk/stefan/selec... apps.biostat.au.dk/stefan/measu... Feel free to use them in your teaching #rstats #datascience #stats

📊When teaching or giving a talk, do you like presenting plots step by step, revealing e.g. one group at a time? This is often useful for walking through complex results. I made a R package that makes it extremely easy to do this! ggreveal: Reveal a ggplot incrementally #rstats #dataviz #ggplot2

Reveal a ggplot incrementally

Provides functions that make it easy to reveal ggplot2 graphs incrementally. The functions take a ggplot2 object and return a list of plots showing data incrementally by panels, layers, groups, the va...

weverthon.com