Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Majority command: Not producing new varname


From   "Nick Cox" <n.j.cox@durham.ac.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: Majority command: Not producing new varname
Date   Sun, 25 Apr 2004 17:13:46 +0100

Sounds like me. Send me some data and I'll have 
a look. 

Nick 
n.j.cox@durham.ac.uk 

Tonya Cropper
 
> I am using the majority command (author: Nicholas J. Cox) to 
> count majority
> items in a specific group (defid).  However, when I used the option
> generate(newvarlist) with one variable to return the majority 
> calculation,
> the variable is not generated.  Below is the command I typed 
> and an extract
> of the results.  I would like to further manipulate the 
> majority valuable,
> but it is not generated from this command.  Any help is 
> appreciated. Thank
> you.
> 
> majority predelib, pos(1) neg(2) by(defid) gen(maj)
> 
>   +------------------------------------------------+
>   | defid   total   positive   negative   majority         |
>   |------------------------------------------------|
>   |     3       5          2          2          0            
>         |
>   |     7       3          2          0          2            
>         |
>   |     9       3          1          0          1            
>         |
>   |    11       4          0          3         -3                  |
>   |    13       3          0          1         -1                  |
>   |------------------------------------------------|
> 

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index