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

Re: Re: st: create a contingency table


From   Jean-Benoit Hardouin <jean-benoit.hardouin@club-internet.fr>
To   statalist@hsphsun2.harvard.edu
Subject   Re: Re: st: create a contingency table
Date   Wed, 05 Nov 2003 15:24:14 +0100

On Tue, 4 Nov 2003 23:40:52 -0000, Nick Cox <n.j.cox@durham.ac.uk> wrote:
OK Nick,
"contract" is exactly the command I searched.
I want to create a new dataset, not to display a table !! The confusion is due to the french language where "table (french)" means "dataset (english)" and "table (english)" is translated in "tableau (french)". Thank you.
Jean-Benoit


_EITHER_ the same answer

bysort Item? : gen Count = _N
by Item? : gen tag = _n == 1
list Item? Count if tag

If you want just to keep the
table as new dataset:

keep if tag
keep Item? Count

_OR_

contract Item?

See [R] contract.

I guess I would have suggested that earlier
if I had sensed interest in dataset as result,
rather than table as result.

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

*
*   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/




--
Jean-Benoit Hardouin
37, rue Arrachart
41000 Blois
tél : 02 54 45 39 75
email : jean-benoit.hardouin@club-internet.fr
http://www.jb-hardouin.fr.st
http://www.anaqol.fr.st
*
*   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