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]

st: how to use part of a variable as weight


From   Abu Camara <[email protected]>
To   [email protected]
Subject   st: how to use part of a variable as weight
Date   Wed, 12 Oct 2011 16:13:56 +0300

Dear Statalist,

I am tabulating using the following command but the variable
"indicator" whose code correspond to
for example "10" is my weight. So the command should use values of the
variable "value" that correspond to indicator==10  as my weight.
But I get no output and my output is in fact "no observation". Any
help would be appreciated.

**--command-----.
table  rda  year [aweight=indicator==10] if  indicator==4, c(mean  value) row


**-------sample data------------------.
id    country    indicator    year    region    ecog    oil    value
11990    Afghanistan    FDI Inflows in current USD millions    1990
ASIA-8    LDMC-25    Non-Oil-34
11990    Afghanistan    Net trade in goods and services (BoP, % of
GDP)    1990    ASIA-8    LDMC-25    Non-Oil-34
11990    Afghanistan    Revenue, excluding grants (% of GDP)    1990
 ASIA-8    LDMC-25    Non-Oil-34
11990    Afghanistan    External debt stocks, total (DOD, % of GDP)
1990    ASIA-8    LDMC-25    Non-Oil-34
11990    Afghanistan    ODA Commitments (All Donors), in current USD
millions    1990    ASIA-8    LDMC-25    Non-Oil-34    164.63
11990    Afghanistan    Net trade in goods and services (BoP, current
US$)    1990    ASIA-8    LDMC-25    Non-Oil-34
11990    Afghanistan    Cash surplus/deficit (% of GDP)    1990
ASIA-8    LDMC-25    Non-Oil-34

-- 
Best Wishes,

Abu Camara
*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index