2
votes

I'm working with Stata IC 13 and need to do different types of analysis on different variables of a large dataset.The problem is that my dataset is very large so I get the following error

Up to 2,048 variables are allowed with this version of Stata

Is there a way to name the variables you want to import to work around this problem (using Stata, not other programs)?

I need a flexible way of importing variables by variable names, rather than having to split my original dataset in lots of little subsets. I've heard of alternatives, but I'm relatively new to Stata so I would be very grateful if anyone could show me code examples of how they get around this limit on a daily basis.

Let's take a silly example. Let's say I want to import only the variables pared and public from this dataset.

use http://www.ats.ucla.edu/stat/data/ologit.dta, clear

How would you do it?

1

1 Answers

6
votes

help use spells out that optionally you can specify variable names with use:

Load subset of Stata-format dataset

   . use [varlist] [if] [in] using filename [, clear nolabel]

and there are examples in the help too. So, in your example,

  . use pared public using http://www.ats.ucla.edu/stat/data/ologit.dta, clear