Beta Regression with Autoregressive Errors for Interrupted Time Series Analysis of Proportion and Rate Outcomes: A Simulation Study
This paper introduces *betark*, a Stata command for joint maximum likelihood estimation of beta regression with autoregressive errors for interrupted time series analysis of bounded outcomes, and demonstrates through simulation that it provides better-calibrated inference than standard quasi-likelihood GLMs with HAC corrections, particularly in scenarios with highly persistent autocorrelation.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are a detective trying to solve a mystery: Did a new policy (like a school banning soda or a hospital changing its hygiene rules) actually change the outcome you care about? Maybe you're tracking the percentage of students who finish their homework, or the daily rate of infections in a hospital. These numbers are special because they are proportions—they can't be less than 0% or more than 100%. They are trapped inside a box.
For a long time, detectives used a standard tool called "Ordinary Least Squares" (OLS) to solve these cases. But the paper argues that using OLS on proportions is like trying to measure a fish with a ruler meant for rocks. It ignores the fact that the fish is slippery and bounded; it might predict a 110% infection rate, which is impossible.
To fix the "fish" problem, statisticians invented a better tool called Beta Regression. It understands that proportions live in a box. But here's the twist: time series data (data collected day after day) is often "sticky." If today's infection rate is high, tomorrow's is likely high too. This is called autocorrelation.
The paper compares two detectives trying to solve a case with sticky, box-bound data:
- Detective GLM+HAC: This detective uses the "Beta Regression" tool to handle the box, but then tries to fix the "stickiness" with a patch called Newey–West standard errors. It's like wearing a raincoat and then taping a plastic sheet over it to stop the wind.
- Detective betark: This detective uses a brand-new, custom-built tool called betark. It doesn't just patch the wind; it builds the wind into the design of the raincoat from the start. It models the "stickiness" (autoregressive errors) and the "box" (beta distribution) all at once, in a single, unified calculation.
The Big Showdown: What the Simulations Revealed
The authors didn't just guess; they ran a massive simulation study (a computer experiment) 2,000 times for different scenarios to see which detective was better. They tested cases where the data was "sticky" in different ways: a little bit sticky, wiggly (oscillating), and very sticky (highly persistent).
The Verdict:
In most scenarios, betark was the superior detective. It gave more accurate answers about how confident it should be in its conclusions.
- The "Too Confident" Trap: When the data was very sticky (highly persistent autocorrelation), Detective GLM+HAC started to lie. It thought it was much more certain than it actually was. In the simulations, when the data was highly sticky and the series was short (100 time points), GLM+HAC falsely claimed a "significant" result (a Type I error) 60.2% of the time when there was actually no effect at all. That's like a smoke detector going off 6 out of 10 times when there's no fire.
- The Better Calibrator: betark also made mistakes in these tough, sticky scenarios, but far fewer. At the same short length (100 time points) with highly sticky data, it falsely claimed a result 43.0% of the time. While still high, it was much better than the other detective. As the series got longer (up to 400 time points), betark got better and better, while GLM–HAC barely improved.
The "Power" Illusion:
You might think the detective who shouts "I found a signal!" more often is better. In the simulations, GLM+HAC did shout "Signal!" more often in the sticky scenarios. But the paper explains this isn't a superpower; it's a glitch. Because GLM+HAC underestimated how much the data was wobbling, its "confidence intervals" (its margin of error) were too narrow. It was shouting "I'm sure!" when it should have been saying "I'm not so sure." betark was more honest about its uncertainty.
The "What If" Tests
The authors also asked: "What if we get the details slightly wrong?"
- Wrong Lag Order: What if the data is actually sticky for 3 days, but we tell the tool it's only sticky for 2? The paper found that betark is surprisingly tough. Being off by one day in the "stickiness" setting only changed the accuracy by about 1–2%. It's a robust tool.
- Different Starting Points: What if the starting infection rate was very low (5%) or medium (50%)? betark handled these changes just as well as the standard scenarios.
The Real-World Example (The "Fake" Diabetes Study)
To show how this matters in real life, the authors created a fake study about a diabetes program. They simulated 300 days of data where a clinic tried to lower the percentage of patients with high blood sugar.
- When the data was "sticky" (AR(3)), the two detectives gave different answers about how sure they were.
- In one case, betark found a stronger effect (a bigger drop in sugar) but said, "I'm only 71% sure this is real" (p-value 0.283).
- GLM+HAC found a weaker effect but said, "I'm 86% sure this is real" (p-value 0.134).
- The paper points out that the second detective is tricking you. It's claiming more confidence than it deserves because it didn't properly account for the "stickiness" of the data.
The Bottom Line
The paper concludes that betark is a better tool for analyzing proportions and rates over time, especially when the data is "sticky." It provides a more honest picture of uncertainty.
However, the authors are careful not to call it a magic wand. Even betark struggled when the data was extremely sticky (AR(3) with high persistence) and the time series was short. In those specific, tough cases, even the best detective still had a high chance of making a false alarm (Type I error).
So, if you are analyzing data like infection rates or school attendance:
- Don't use the old, broken ruler (OLS).
- If you use the standard "patched" tool (GLM+HAC), be very careful if your data is sticky; you might be overconfident.
- The new betark tool is generally the better choice, but if your data is super sticky and you don't have a lot of time points, you still need to be very cautious about your conclusions.
The paper doesn't claim to have solved the problem of sticky, bounded data forever, but it has built a much better tool for the job than what was available before.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.