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
Merge Panel Data set by IdsI have a panel data set (Master) with id, name, month, and year. I have another data set (Data set …
different count problems within variablesHi there! The forum already helped me a great deal (thx especially to Nick Cox!). However I am now …
Why different results for tests for serial correlation / autocorrelation in panel data (abar, actest, xtserial)?I would like to test my panel data for serial correlation. The panel data is unbalanced and has gaps…
help with foreach using 2 variable lists to generate a new variableHello all. I am trying to use foreach to generate a new variable based on multiple variables from 2 …
Help with new variable generationHi, I`m trying to generate a new variable = different expressions by sex, but only if sex==0 the exp…
Subscribe to:
Post Comments (Atom)
0 Response to Why inlist is limited to 250 arguments
Post a Comment