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   "Tonya Cropper" <[email protected]>
To   "Statalist" <[email protected]>
Subject   st: Re: Majority command: Not producing new varname
Date   Sun, 25 Apr 2004 16:41:22 -0400

Oops, now  I know what I did wrong.  My dataset is very large, so I  broke
the list output before the entire output was completed .  I was testing this
command
interactively.  Once I ran it in my do file it worked fine.

Sorry,

Thanks,

Tonya

----- Original Message ----- 
From: <[email protected]>
To: <[email protected]>
Sent: Sunday, April 25, 2004 1:04 PM
Subject: RE: Majority command: Not producing new varname


Works for me. I am using -majority- 1.2.0.

What

Nick
[email protected]

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