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
New iscogen package available from SSCA new package called iscogen is now available from SSC. To install the package, type Code: . ssc i…
Results of Diff-in-Diff and MESRDear All, I have two datasets. The first is a cross-sectional dataset for the 2017/2018 cropping sea…
Synthetic control method: how to select V matrixDear all, I am learning Synthetic Control method, Stata has command Code: synth . When I read th…
Help matching city names in two data setsI am trying to match data on cities in two data sets using only the names of the cities. Unfortunate…
Time Series Panel DataThis is my first post on here, my apologies for any errors. My data is organized by State and Year.…
Subscribe to:
Post Comments (Atom)
0 Response to Why inlist is limited to 250 arguments
Post a Comment