Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Question regarding displaying Count, number of missing values,min, max in one table


From   Nick Cox <njcoxstata@gmail.com>
To   "statalist@hsphsun2.harvard.edu" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Question regarding displaying Count, number of missing values,min, max in one table
Date   Thu, 17 Oct 2013 13:25:50 +0100

sysuse auto, clear
foreach v of var * {
 su `v', meanonly
 di abbrev("`v'", 24) _col(25) %8.0f _N  %8.0f _N - r(N) %8.0g r(min) ///
%8.0g r(max)
}


Nick
njcoxstata@gmail.com


On 17 October 2013 10:45, Michael Stewart
<michaelstewartresearch@gmail.com> wrote:
> Hi ,
>
> This might be a simple question for some stata users ... but sorry, I
> am not able to get it .
>
> I am working with multiple (really huge ) datasets, each with 152
> variables. After  extracting data and converting to stata format using
> the load programs, I am checking accuracy of my conversion by
> comparing summary statistics of my datasets with the ones supplied by
> data supplier.
>
> As part of this, I am trying to get the following statistics for
> continuous variables   in my dataset  displayed as  one single table
>
> 1)Count
> 2)number of missing values
> 3)min
> 4)max
>
> I can get these values from codebook which is not in a table format.
>
> i can also get  these values using tabstat command  but cant get
> number of msising values as a column along with count, min, max in
> same table.
>
> Can any one please help if there are any user written programs or
> tricks with stata commands
>
> Thank you very much for your time.
>
>
> --
> Thank you ,
> Yours Sincerely,
> Mike.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index