Statalist


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

Re: st: value labels in codebook


From   "Sergiy Radyakin" <[email protected]>
To   [email protected]
Subject   Re: st: value labels in codebook
Date   Fri, 2 May 2008 17:49:27 -0400

Try the following:

codebook cwfatal, tab(100)
 or
tabulate cwfatal

Option tab controls the willingness of codebook to show more values.
Default is 9.
Both commands might hit the limit at about 99. There were user-written
commands producing large tables.

Also there might be labels defined for values, that do not occur in
the data. My guess is that codebook will never include them at all.

Regards, Sergiy




On 5/2/08, Lektzian, David <[email protected]> wrote:
> Thanks Sergiy,
> But that doesn't exactly do what I want.  I would like to see the
> codebook with labels so that it shows the frequency of occurrence for
> each category along with its label.  For example, the way it does when I
> use codebook on -cwfatal1- below.  I think the problem is that the
> variable cwhiact1 has more categories than codebook wishes to show.  But
> I would like to see them all, not just an example.
> David
>
> .codebook  cwfatal1
>
> ------------------------------------------------------------------------
> ----------------------
> cwfatal1
> Fatality level for cc1
> ------------------------------------------------------------------------
> ----------------------
>
>                  type:  numeric (byte)
>                 label:  fatality
>
>                 range:  [0,6]                        units:  1
>         unique values:  7                        missing .:
> 10280/13388
>
>            tabulation:  Freq.   Numeric  Label
>                          2392         0  none
>                           308         1  1-25 deaths
>                           102         2  26-100 deaths
>                            45         3  101-250 deaths
>                            21         4  251-500 deaths
>                            33         5  501-999 deaths
>                           207         6  >999 deaths
>                         10280         .
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Sergiy
> Radyakin
> Sent: Friday, May 02, 2008 3:07 PM
> To: [email protected]
> Subject: Re: st: value labels in codebook
>
> label list action
>
> Sergiy
>
>
> On 5/2/08, Lektzian, David <[email protected]> wrote:
> > Dear Statalist,
> > I have a variable that I attached value labels to and I want to see
> all
> > the value labels when I use codebook, but it only shows one "example".
> > Below is the describe, the codebook, and the labelbook on the variable
> > and label.  Can anybody tell me how to make codebook display all of my
> > value labels, or is there another utility that will do this?
> >
> > . describe cwhiact1
> >
> >              storage  display     value
> > variable name   type   format      label      variable label
> >
> ------------------------------------------------------------------------
> > -------
> > cwhiact1        byte   %33.0g      action     Highest action by cc1 in
> >                                                dispute (see MID B
> > codebook)
> >
> >
> > . codebook cwhiact1
> > cwhiact1                                 Highest action by cc1 in
> > dispute (see MID B codebook)
> >
> ------------------------------------------------------------------------
> > ----------------------
> >
> >                  type:  numeric (byte)
> >                 label:  action, but 1 nonmissing value is not labeled
> >
> >                 range:  [0,21]                       units:  1
> >         unique values:  18                       missing .:
> 9975/13388
> >
> >              examples:  17    Seizure [4]
> >                         .
> >                         .
> >                         .
> >
> >
> > . labelbook action
> >
> >
> ------------------------------------------------------------------------
> > ----------------------
> > value label action
> >
> ------------------------------------------------------------------------
> > ----------------------
> >
> >      values                                    labels
> >       range:  [-9,23]                   string length:  [8,33]
> >           N:  24                unique at full length:  yes
> >        gaps:  yes                 unique at length 12:  no
> >  missing .*:  0                           null string:  no
> >                               leading/trailing blanks:  no
> >                                    numeric -> numeric:  no
> >  definition
> >          -9   Missing [-9]
> >           1   No militarized action [1]
> >           2   Threat to use force [2]
> >           3   Threat to blockade [2]
> >           4   Threat to occupy territory [2]
> >           5   Threat to declare war [2]
> >           6   Threat to use nuclear weapons [2]
> >           7   Show of troops [3]
> >           8   Show of ships [3]
> >           9   Show of planes [3]
> >          10   Alert [3]
> >          11   Nuclear alert [3]
> >          12   Mobilization [3]
> >          13   Fortify border [3]
> >          14   Border violation [3]
> >          15   Blockade [4]
> >          16   Occupation of territory [4]
> >          17   Seizure [4]
> >          18   Clash [4]
> >          19   Raid [4]
> >          20   Declaration of war [4]
> >          21   Use of CBR weapons [4]
> >          22   Interstate war [5]
> >          23   Joins interstate war [5]
> >
> >   variables:  cwhiact1
> >
> >
> >
> > *
> > *   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/
> >
> *
> *   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/
>
> *
> *   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/
>
*
*   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