Showing 1 - 9 of 9
Distinct observations are those different with respect to one or more variables, considered either individually or jointly. Distinctness is thus a key aspect of the similarity or difference of observations. It is sometimes confounded with uniqueness. Counting the number of distinct...
Persistent link: https://www.econbiz.de/10005748347
The count command has one simple role, to count observations in general or that satisfy some condition(s). This task can be useful when some larger problem pivots on counting, especially if count is used with a loop over observations or variables. I use various problems, mostly of data...
Persistent link: https://www.econbiz.de/10005748352
Many problems in data management center on relating values to values in other observations, either within a dataset as a whole or within groups such as panels. This column reviews some basic Stata techniques helpful for such tasks, including the use of subscripts, summarize, by:, sum(), cond(),...
Persistent link: https://www.econbiz.de/10009221534
Since 2003, the Stata Journal has included Stata Tips on special issues in data analysis with Stata. Now Seventy-six Stata Tips, 2nd Edition compiles these useful guides into a compact tome for ease of reference. In keeping with the Stata spirit, Tips are from Stata users and StataCorp employees...
Persistent link: https://www.econbiz.de/10008566193
The problem of handling Roman numerals in Stata is used to illustrate issues arising in the handling of classification codes in character string form and their numeric equivalents. The solutions include Stata programs and Mata func- tions for conversion from numeric to string and from string to...
Persistent link: https://www.econbiz.de/10008862275
Spells in time series (and more generally in any kind of one-dimensional series) may be defined as sequences of observations that are homogeneous in some sense. For example, a categorical variable may remain in the same state, or values of a measured variable may satisfy the same true-false...
Persistent link: https://www.econbiz.de/10005450155
A standard task in data management is producing a list of variable names showing which variables have specific properties, such as being of string type, or having value labels attached, or having a date format. A first-principles strategy is to loop over variables, checking one by one which have...
Persistent link: https://www.econbiz.de/10008455926
Since 2003, the Stata Journal has published Stata Tips on special issues in data analysis with Stata. Now Thirty-three Stata Tips compiles these useful guides into a compact tome for ease of reference. In keeping with the Stata spirit, Tips are from Stata users and StataCorp employees alike and...
Persistent link: https://www.econbiz.de/10005568778
Counting panels, and more generally groups, is sometimes possible in Stata through a reduction command (e.g., collapse, contract, statsby) that produces a smaller dataset or through a tabulation command. Yet there are also many problems, especially with irregular sets of observations for varying...
Persistent link: https://www.econbiz.de/10005568848