Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: -winsor- and -dlist- revised on SSC


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: -winsor- and -dlist- revised on SSC
Date   Thu, 10 Aug 2006 22:54:49 +0100

Thanks to Kit Baum, packages -winsor- and -dlist- 
have been revised on SSC. See help on -ssc- for 
details of installation. 

-winsor-
========

The change entails adding some biographical information
on Charles P. Winsor, after whom the procedure was named, 
to the help file. Stata 7 is required. 

-dlist-
=======

The main change is the addition of a -duplist- program
to the package. This is in response to a question by 
Holly Wright on 21 July answered by me on 30 July. 
(I didn't do quite what Holly asked....) 
Stata 8.2 is required. 

The original -dlist- is a hybrid of -describe- and -list-
insofar as you can see variable labels too. Thus

. sysuse auto
(1978 Automobile Data)

. dlist in 1

1.
make           Make and Model            AMC Concord
price          Price                     4,099
mpg            Mileage (mpg)             22
rep78          Repair Record 1978        3
headroom       Headroom (in.)            2.5
trunk          Trunk space (cu. ft.)     11
weight         Weight (lbs.)             2,930
length         Length (in.)              186
turn           Turn Circle (ft.)         40
displacement   Displacement (cu. in.)    121
gear_ratio     Gear Ratio                3.58
foreign        Car type                  Domestic

You can tune the amount of space devoted to 
variable names, including a special case of 
omitting them altogether: 

. dlist in 1, name(0)

1.
Make and Model            AMC Concord
Price                     4,099
Mileage (mpg)             22
Repair Record 1978        3
Headroom (in.)            2.5
Trunk space (cu. ft.)     11
Weight (lbs.)             2,930
Length (in.)              186
Turn Circle (ft.)         40
Displacement (cu. in.)    121
Gear Ratio                3.58
Car type                  Domestic

-duplist- lists duplicates on the variables specified 
just once, although observation numbers are shown. 
(Possessors of very large datasets can probably break 
this, but that doesn't worry me much.) 

. duplist rep78

40 48
rep78   Repair Record 1978    1

12 17 18 21 22 23 46 52
rep78   Repair Record 1978    2

1 2 4 6 8 9 10 11 13 14 16 19 25 26 27 28 31 32 34 36 37 39 41 42 44 49 50 54 60 65
rep78   Repair Record 1978    3

5 15 24 29 30 33 35 38 47 55 56 58 59 62 63 70 72 73
rep78   Repair Record 1978    4

20 43 53 57 61 66 67 68 69 71 74
rep78   Repair Record 1978    5

As with -dlist-, there are other options. Here is just one example.

. bysort foreign: duplist rep78, name(0) varlabel(0)

-----------------------------------------------------------------------------------------------
-> foreign = Domestic

40 48
1

12 17 18 21 22 23 46 52
2

1 2 4 6 8 9 10 11 13 14 16 19 25 26 27 28 31 32 34 36 37 39 41 42 44 49 50
3

5 15 24 29 30 33 35 38 47
4

20 43
5

-----------------------------------------------------------------------------------------------
-> foreign = Foreign

54 60 65
3

55 56 58 59 62 63 70 72 73
4

53 57 61 66 67 68 69 71 74
5

Nick 
[email protected] 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index