Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: RE: AW: ratio function


From   "Roman Kasal" <kasal@trexima.cz>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: AW: ratio function
Date   Thu, 1 Apr 2010 14:07:28 +0200

thanks for replay,

but it ignores unpaired data :(

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Martin Weiss
Sent: Thursday, April 01, 2010 2:05 PM
To: statalist@hsphsun2.harvard.edu
Subject: st: AW: ratio function


<> 

So you want the ratio of means and se, but that seems to be exactly what
-ratio- gives you:


*************
webuse highschool, clear
svyset

svy: ratio height/weight

quietly svy: mean height weight
nlcom (myratio: _b[height]/_b[weight])
*************



HTH
Martin


-----Ursprüngliche Nachricht-----
Von: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] Im Auftrag von Roman Kasal
Gesendet: Donnerstag, 1. April 2010 13:58
An: statalist@hsphsun2.harvard.edu
Betreff: st: ratio function

dear Sir/Madam

How to come around command like this?

svy: mean(columnA)/mean(columnB)

I would like to estimate ratio of means and its standard error. How is
it possible with STATA?
It is strange that function "ratio" takes into account just pairs....but
why when "ratio" divides whole mean(columnA)/mean(columnB)? Why the
function ignores missing values? In real life is very improbable that I
have perfect paired variables.

thank you

Roman Kasal


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

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index