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

st: -desmat- with the defcon(dev(#)) option seems to misbehave


From   "Kim Lyngby Mikkelsen (KLM)" <[email protected]>
To   <[email protected]>
Subject   st: -desmat- with the defcon(dev(#)) option seems to misbehave
Date   Wed, 14 Jan 2004 10:57:45 +0100

Dear Statalisters--
 
The constant term reported by -desmat- using the defcon(dev#)) option, is not the constant I expected. 
 
In the example given below, the constant term reported by -desmat- is an un-weighted mean of the within category means, where I would have expected the overall mean to be reported!
 
Is this a bug or the intension?
 
 
I am using Stata 8 for Windows updated 15 Dec 2003, and my -desmat- is up to date:
. which desmat
c:\ado\stbplus\d\desmat.ado
*! version 3.1, 29Oct2002, [email protected]
 
 
Example:
In the following, somewhat silly, example I would like to see if one category of 'education years' (soev1: 3 categories (<8, <11, or more)) have a mean height which differs from the overall mean height:
 
The mean height of the sample population is:
. su height if soev1!=.
 
Variable | Obs       Mean     Std. Dev. 
---------+-------------------------------
 height  | 15089     167.933  9.044364   
 
 
And the height by category of educational years is:
. table  soev1, c(mean  height freq) f(%9.3f) row
 
----------------------------------------
education |
, years   | mean(height)           Freq.
----------+-----------------------------
        1 |       165.955          6,687
        2 |       168.886          6,772
        3 |       172.089          1,630
          | 
    Total |       167.933         15,089
----------------------------------------
(Higher people have more education years (or vice versa)).
 
 
 



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index