Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: AW: New -panels- package available from SSC


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: AW: New -panels- package available from SSC
Date   Thu, 22 Oct 2009 11:23:34 +0200

<> 

Very good idea! 

Just playing around with it: Could the sentence in the help file "Variables
referred to in command are assumed to be constant within panels." be backed
up by a check on the part of the command whether that is really the case? 


*************
sysuse auto, clear
//first attempt
panels rep: su gear
//second attempt
panels rep: su gear
*************

gives a different result for every execution. This is in keeping with the
description in the help file, but could be a bit of a hazard for some
users...

HTH
Martin


-----Ursprüngliche Nachricht-----
Von: [email protected]
[mailto:[email protected]] Im Auftrag von Ben Jann
Gesendet: Mittwoch, 21. Oktober 2009 22:20
An: statalist
Betreff: st: New -panels- package available from SSC

Thanks to Kit Baum, a new package called -panels- is now available
from the SSC Archive. Type

 . ssc install panels

to install.

-panels- has two purposes:

(1)  Quickly count panels (groups) in a dataset and display some basic
information about the sizes of the panels. You can also use -panels-
simply to count the number of distinct (unique) values of a variable.
See Cox (2007) for some thoughts on counting panels.

Cox, N. J. (2007). Speaking Stata: Counting groups, especially panels.
The Stata Journal 7(4):571-581.
http://www.stata-journal.com/article.html?article=dm0033

(2)  Compute statistics based on panel units (instead of individual
observations). -panels- can be used as a prefix command to other Stata
commands to apply them to panel units instead of individual
observations. This is useful, for example, if you want to compute
frequency
distributions or summary statistics for panel characteristics.

Examples:

. webuse nlswork, clear
(National Longitudinal Survey.  Young Women 14-26 years of age in 1968)

. panels idcode

Number of obs      =     28534
Number of groups   =      4711

Obs per group: min =         1
               avg =  6.056888
               max =        15

. panels idcode if race==2

Number of obs      =      8051
Number of groups   =      1325

Obs per group: min =         1
               avg =  6.076226
               max =        15

. panels idcode: tabulate race

   1=white, |
   2=black, |
    3=other |      Freq.     Percent        Cum.
------------+-----------------------------------
          1 |      3,329       70.66       70.66
          2 |      1,325       28.13       98.79
          3 |         57        1.21      100.00
------------+-----------------------------------
      Total |      4,711      100.00

ben
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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