Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Summarize and Tabulate


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: Summarize and Tabulate
Date   Wed, 16 Jan 2008 16:34:18 -0000

Quite orthogonally, note that the "Hg" in blood pressure units is the
chemical symbol for mercury, and not some other unit. 

So the units are mm Hg, not mm/Hg. 

Nick 
[email protected] 

Maarten buis

Gauri had trouble posting the message below on statalist. So here is my
attempt. 

I also think I what went wrong. My idea is that while transforming sbp
(string) to sbpnew (numeric), Gauri inadvertantly created a variable
with values 1, 2, 3, 4, ..., which were given value labels 100, 102,
103, 104 (the measured bloodpresure). So when computing summary
statistics Stata looks at the actual values of the variables (1, 2, 3,
...) while when tabulating Stata displays the value labels (100, 102,
103, ...). 

If that is the case, than the following remark from the help file of 
-encode- may be relevant:

Do not use encode if varname contains numbers that merely happen to be
stored as strings; instead, use -generate newvar = real(varname)- or 
-destring-.

Hope this helps,
Maarten


--- Gauri Khanna <[email protected]> wrote:
> Dear Statalist, 
>  
>  
> I have run into an odd problem. I have a variable called sbpnew
> (which is systolic blood pressure measured in mm/Hg).  I created
> sbpnew from its original variable sbp which was a string variable.
>  
>  I used -summarize- to look at the mean and the minimum and maximum
> values of sbpnew. The maximum value stated is 116 but when I
> -tabulate sbpnew- I observe many values in the 200 range. I also
> generated a histogram  using -histogram sbpnew - and again I get a
> maximum value in the histogram of around 116. I copy parts of my log
> file showing the output.
>  
>   
> Could any one advise on why the -summarize- measure and the
> -tabulate- measure are different?
>  

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