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?
```
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?
Comment