Usage is simple: Existing RTMB machinery + passing a bandwidth argument to LaMaβs forward():
π janolefi.github.io/LaMa/referen...
Posts by Jan-Ole Fischer
We develop a banded approximation to the forward algorithm (used to evaluate the HMM likelihood) thereby constructing the required sparsity.
The trade-off between computational efficiency and accuracy can be controlled by a single bandwidth parameter.
(R)TMB can integrate out high-dimensional random effects β such a those arising from the GMRF approximation of the SPDE approach β if the Hessian w.r.t. the random effects is sparse. This is not the case for the HMM likelihood because the observed process in HMMs is not Markovian.
New preprint π Fast inference in HMMs with latent Gaussian fields (via SPDE approach + RTMB) β‘οΈ
π arxiv.org/abs/2603.17469
We modify the forward algorithm to recover a sparse Hessian β‘οΈ Fast automatic Laplace approximation
Case studies: 1) Detecting stellar flares 2) Lion movement w spatial field
LaMa and RTMBdist updated π
Published in @jappliedecology.bsky.social!π
We show how (Hierarchical) Hidden Markov Models ((H)HMMs) can be tailored to different epidemiological scenarios to infer disease status directly from animal movement data.
π ttps://besjournals.onlinelibrary.wiley.com/doi/10.1111/1365-2664.70323
Promotional image for webRios showing the app icon and an iPhone displaying the R console. The console shows example R commands with syntax highlighting: basic arithmetic (1 + 1), a print statement saying 'Hello from iOS!', a warning message in orange reading 'Uh-oh, I'm in the Apple-verse?', an error message in red with the HAL 9000 quote 'I'm sorry, Dave. I'm afraid I can't do that.', and a plot command.
webRios is live. #rstats on your iPhone and iPad.
I showed native R compilation on #iOS last week. Shipping it is another story (thanks, GPL). This version uses #webR 's #WebAssembly build instead. Different tradeoffs, but this one clears App Review.
apps.apple.com/us/app/webri...
We have a new preprint on covariate-driven #HMMs!
doi.org/10.48550/arX...
@olemole.bsky.social, @rolandlangrock.bsky.social
β’ commonly used hypothetical stationary distribution can be biasedβ οΈ
β’ we propose 2 approaches allowing unbiased inference
β’ simulations and case study on GalΓ‘pagos tortoisesπ’πΊοΈ
The 'bpvars' package for Forecasting with Bayesian Panel Vector Autoregressions
β¬π¦βͺ Two years in the making! In a fantastic collaboration with Miguel from the International Labour Organisation! π€π The 'bpvars' package for Forecasting with Bayesian Panel Vector Autoregressions is out on CRAN! And it's spectacular!
cran.r-project.org/package=bpvars
#bpvars #bsvars.org #rstats
And that assessment is totally unbiased ofc π
Comparison between true state probabilities, stationary approximation, and periodically stationary distribution for three different simulated Markov Chains. The bias of the stationary distribution is severe.
Overall dwell-time distribution in the active state of the fruit flies in two light conditions. Both distributions deviate substantially from a geometric one.
Using #simulations and a case study on #fruitflies πͺ°, we show that
- the widely used stationary approximation can be severely biased! β
- dwell-time distributions can deviate substantially from a #geometric shape.
#HMM #MarkovChain #seasonality #diel #stats #rstats #StatisticalEcology #behaviour
Periodically stationary distribution (probability that the fly is active) as a function of the time of day. True stationary distribution is compared to biased approximation, and we see a substantial difference.
Our paper on #HMMs with periodically β° varying transition probabilities is published! π @carlinafeldmann.bsky.social, Sina Mews, @rmichels.bsky.social @rolandlangrock.bsky.social
doi.org/10.1214/25-AOAS2107
We derive the periodically #stationary distribution and the implied dwell-time distribution
Screenshot of an item in the new R-devel release, that says: x %notin% table newly in base is an idiom for !(x %in% table) and provided almost entirely for convenience and code readability, from an R-devel suggestion, after many years of private definitions mostly hidden in packages, including in R's tools package.
%notin% is coming to Base R! Heck to the yes.
We are truly blessed on this day, thank you R Core. π€©
#rstats
Day 2: devtools - Essential Development Workflow π§
The devtools package streamlines your package development workflow with key functions! β‘
π‘ Pro Tip: Use Ctrl/Cmd + Shift + L in RStudio to quickly run load_all().
π Resources: devtools.r-lib.org
#RPackageDev #RStats #devtools #RPackageAdvent2025
Figure with two panels. Left panel: visualisation of a 3D movement track. Right panel: visualisation of the 3D direction of movement as two angles (one horizontal angle and one vertical angle).
We have a preprint about modelling three-dimensional movement tracks, led by @njklappstein.bsky.social.
The model takes the form of a step selection function and, just like in 2D, it can include directional persistence, attraction to targets, and habitat selection.
doi.org/10.1101/2025...
Version history of moveHMM R package, showing version 1.0 dated 2015-10-23
moveHMM version 1.0 turns 10 today π Such a fun 10 years; exchanging with folks who use the package (and its extensions) has been one of the best parts of my job!
The LaMa package provides a versatile framework for inference with latent Markov models, designed to make building such models fun and efficient.
Check out the vignettes and start building models! π οΈ
π janoleko.github.io/LaMa/
Our review paper on latent Markov models is now published in Statistical Modelling! π @rolandlangrock.bsky.social @SinaMews.
We discuss choosing the right time and space formulation and provide the R package π¦ LaMa for fast β‘and flexible estimation.
π Paper: journals.sagepub.com/eprint/UETXX...
All the relevant methodology is fully implemented π οΈ in my R package LaMa π¦:
janoleko.github.io/LaMa/
My paper is out! π I explore hidden semi-Markov models with covariate-dependent state dwell-time distributions β because sometimes Markov just isnβt enough.
Case study: Arctic muskox movement! π¦¬π
π www.sciencedirect.com/science/arti...
#stats #TimeSeries #HSMM #StatisticalEcology #rstats
Rdatasets is a collection of 2300 free and documented datasets in CSV format. It's a great resource for teaching and exploration!
The new `get_dataset()` function from the {marginaleffects} π¦ allows you to search and load them directly in #Rstats.
vincentarelbundock.github.io/Rdatasets/ar...
Popular meme format, grandma labeled with "bluesky's public launch was one year ago today." Younger person helping her labeled with "sure grandma let's get you to bed."
happy first birthday to Bluesky, and what a year it's been!
with every day, the need for an open network that puts people first becomes increasingly clear. we're glad to be building this with you. after all, the heart of a social network is the people.
The world is on π₯ -- and here's my first publication in an astronomy journal: iopscience.iop.org/article/10.3...
We combine Gaussian processes + hidden Markov models to efficiently detect stellar flares in one modelling step. π§ͺ
Could watch this animation all day π
Did you know that you can create GIFs with gganimate()? They can even be embedded in a latex PDF file and played via Adobe Acorbat Reader π₯
#ggplot #gganimate #datavisualisation #statisticalmodelling #finance #economics #quants
2024 @copernicusecmwf.bsky.social #climate data out today:
π 2024 - first year more than 1.5Β°C above pre-industrial; for ERA5 it was 1.6ΒΊC
π‘οΈΒ the past 10 years were the 10 warmest years on record
π 2024 was warmest year for all continental regions, except Antarctica and Australasia
ππ‘οΈπ§ͺβοΈπ
Quite a nice watch:
youtu.be/TE4R8bumI-Q?...
In this yearβs NFL Big Data Bowl π submission, @rmichels.bsky.social, Robert Bajons, and I employ hidden Markov models to uncover πguarding assignments and use this additional information to improve the prediction of defensive strategies. π
#bigdatabowl #rstats
Big Data Bowl submissions are due tomorrow
π¨π¨
The deadline is 11:59 PM UTC, which is 6:59 PM EST
π¨π¨
#BigDataBowl