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

st: calculation between observations


From   Manchin Miriam <mirim@freemail.hu>
To   statalist@hsphsun2.harvard.edu
Subject   st: calculation between observations
Date   Mon, 8 Sep 2003 19:38:56 +0200 (CEST)


Dear Statalist,

I have a dataset in the following form:

REPORTING	VALUE	TRADE	PARTNER	PRODUCT
group	8	4	001	9
a	.	3	001	9
b	.	1	001	9
group	6	8	002	7
a	.	8	002	7
group	5	4	003	7
b	.	3	003	7
c	.	1	003	7



So I have observations called group for which trade is the sum of the 
observations belonging to the group where partner and product is the 
same. The variable "value" is missing for the group members. There are 
always different number of observations belonging to the group. I 
would like to calculate the missing values for the group members for the 
variable "value" using proportions given by the variable trade (for 
example when partner=001 & product=9 the value for "a" would be 6 
and "b" would be 2).

Thanks a lot for your help,
Miriam 





*
*   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–2022 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index