Stata中synth_runner包pre_limit_mult参数失效问题求助
pre_limit_mult(2) Not Excluding Placebo Groups in synth_runner Let's break down why your pre_limit_mult(2) parameter isn't filtering out those high-RMSPE placebo groups in synth_runner—here are the most likely culprits and fixes:
You put the parameter in the wrong place
Thepre_limit_multargument needs to be nested insidesynth_control()when you callsynth_runner(), not passed directly or stuck in thesynth()function call. A lot of users mess this up. Here's the correct structure:runner_output <- synth_runner( data = your_dataset, treatment = "treated_group", outcome = "your_outcome", predictors = c("pred1", "pred2", "pred3"), pre_period = c(2005, 2015), post_period = c(2016, 2020), control = synth_control(pre_limit_mult = 2) )If your parameter isn't wrapped in
synth_control(), the package ignores the filtering rule entirely.Your pre-period definition is off
Thepre_limit_multfilter relies on the RMSPE calculated over the exact pre-period you specify. If yourpre_periodincludes post-treatment dates, or misses part of the actual pre-treatment window, the RMSPE values will be wrong—and the filter won't catch the groups you expect. Double-check that yourpre_periodmatches the time frame before treatment was applied.You're running an outdated version of synth_runner
Older versions of the package had bugs with thepre_limit_multparameter, or didn't support it at all. Head to your console and runinstall.packages("synth_runner")to grab the latest release, then restart your R session and re-run your code. This fixes a surprising number of parameter-related issues.You're not using the right plotting function
Even if the filter worked behind the scenes, if you're manually extracting placebo data to plot (instead of using the package's built-inplot()method), you'll still see all groups. Make sure you're plotting with:plot(runner_output)This method automatically respects the
pre_limit_multfilter and only shows valid placebo groups.Your placebo groups actually don't exceed the RMSPE threshold
It's possible none of your placebo groups have an RMSPE more than twice the treated unit's. To confirm, manually calculate the RMSPE values:# Extract treated unit's pre-treatment RMSPE treated_rmspe <- runner_output$synth_tables$tab1$RMSPE[runner_output$synth_tables$tab1$Unit == "Treated"] # Extract placebo RMSPEs placebo_rmspe <- runner_output$placebos$rmspe_pre # Check which placebos exceed 2x treated RMSPE sum(placebo_rmspe > 2 * treated_rmspe)If this sum is 0, that means no placebos meet your exclusion criteria—you might need to adjust the threshold or re-evaluate your predictor variables to get more meaningful placebo matches.
内容的提问来源于stack exchange,提问作者Charlotte Van Houtvinck

