Hello Statalist,
This is my first post, and I am looking for some insight on an error message I receive (return code 902) when trying to import a .csv file into Stata using the import delimited command. Any help would be much appreciated.
I am using Stata/MP 15.1 and am working with a dataset that contains 455 observations and approximately 50,000 variables. The reason the dataset is so large is because we have a very long survey with incoming data collected at multiple levels of observations (e.g. individual level, plot level, household level), and the data is currently in wide format with observations unique at the household level, so any sub-household level variables were automatically reshaped wide.
When running the import do file a few days ago on an older batch of data, I had no issues (there were approximately 400 observations at the time). I have set both the maximum variable and memory limit. When I import, I do so from a .csv file that comes directly from the programming platform in which it was collected - SurveyCTO. The platform generates the import do file automatically, so I've written minimal code to tinker with it. Attached is that do file - line 209 is where the code is currently breaking.
Yet, when running it on the most updated version of the dataset, I receive an error message which reads "no room to add more variables because of width. Width refers to the number of bytes required to store a single observation; it is the sum of the widths of the individual variables. The maximum width allowed is 1,048,576 bytes. You just attempted to exceed that."
Is it possible that although I am under the variable limit of 120,000 I could still be brushing up against some dataset width limit? Is there any way to work around this? Thank you very much and please let me know if sharing any other information would be of help.
Best,
Sarina
This is my first post, and I am looking for some insight on an error message I receive (return code 902) when trying to import a .csv file into Stata using the import delimited command. Any help would be much appreciated.
I am using Stata/MP 15.1 and am working with a dataset that contains 455 observations and approximately 50,000 variables. The reason the dataset is so large is because we have a very long survey with incoming data collected at multiple levels of observations (e.g. individual level, plot level, household level), and the data is currently in wide format with observations unique at the household level, so any sub-household level variables were automatically reshaped wide.
When running the import do file a few days ago on an older batch of data, I had no issues (there were approximately 400 observations at the time). I have set both the maximum variable and memory limit. When I import, I do so from a .csv file that comes directly from the programming platform in which it was collected - SurveyCTO. The platform generates the import do file automatically, so I've written minimal code to tinker with it. Attached is that do file - line 209 is where the code is currently breaking.
Yet, when running it on the most updated version of the dataset, I receive an error message which reads "no room to add more variables because of width. Width refers to the number of bytes required to store a single observation; it is the sum of the widths of the individual variables. The maximum width allowed is 1,048,576 bytes. You just attempted to exceed that."
Is it possible that although I am under the variable limit of 120,000 I could still be brushing up against some dataset width limit? Is there any way to work around this? Thank you very much and please let me know if sharing any other information would be of help.
Best,
Sarina
Comment