I don't have a coding issue, I have more of a query about the inner workings of Stata. I'm using a synthetic controls approach to evaluate the causal impact of COVID-19 vaccine mandates on case rates. I have daily panel data for New York City (and in fact, all counties in NY state). I put the syntax in and Stata spits out error 130 "expression too long" at me. So, I figured I'd used trace to investigate.
```
qui replace __00000J=1 if inlist(date,22128...22508)
```
I looked it up, and apparently the inlist function can only have 250 arguments. I don't necessarily have a problem with this, since I've never used (and don't plan on manually using) more than 10ish arguments in a function; the obvious fix is to just limit my total time periods, which I've done. I also suppose not many people will be using daily data with that many time periods either, so in common practice, not many people would need to use that many arguments in inlist.
But at the same time, I've never encountered an issue like this before. It just seems arbitrary. I guess my question is why is inlist limited to 250? Do other functions such as inrange have similar properties? Perhaps this is a query for someone from Stata Corp?
Related Posts with Why inlist is limited to 250 arguments
Confidence Interval with Graph DotDear all, I am trying to add confidence intervals to a graph dot showing the mean value of anti-imm…
REPLACING #VALUE! and #NUM! to "." from excel databaseHello! I need help to find a code that allow me to replace #VALUE! and #NUM! to "." from an excel im…
Dummy omitted because of collinearity - FEHi everyone, I am running a FE regression with dependent variable = lnyield and the independent var…
using a loop to remove special characters and destring a variablemy data are a five point likert scale with 21 questions. The answers were recorded as string variabl…
Keep only children and disregard adult children which start their own familyHello STATALIST community, I am a desperate student at the University of Konstanz in Germany and I …
Subscribe to:
Post Comments (Atom)
0 Response to Why inlist is limited to 250 arguments
Post a Comment