Statalist


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

st: RE: Data generating


From   "Torben Mideksa" <[email protected]>
To   <[email protected]>
Subject   st: RE: Data generating
Date   Fri, 21 Nov 2008 08:51:51 +0100

10Q Carlo!
However, what I needed is to generate monthly data for 50 or more years for
more than 40 cases. Unless I am missing something from your answer, while
the approach you suggested works focusing on a single year for a single
case, it is awkward to work with for a large data set with many years and
many cases. I am wondering if there is a trick in stata that generates the
monthly data at once I feed the annual data for all cases.  I can live with
zero variance property of the monthly data for a while if non-zero variance
results in huge computational cost. Once again, thanks ahead of time for
your help.

Kind Regards,
Torben

>-----Original Message-----
>From: Carlo Lazzaro [mailto:[email protected]]
>Sent: 20. november 2008 09:39
>To: [email protected]
>Cc: 'Torben Mideksa'
>Subject: R: Data generating
>
>Dear Torben,
>Question nr 1: How do I do this in stata?
>Answer nr 1 (please, consider that what follows refers to each one of
>your years. I assume that the annual value a is 100):
>set obs 12
>g a=100/12
>Question nr 2: How do I do it in stata if I want to assume a non-zero
>variance still maintaining the sum of the monthly data equals the annual
>data?
>Answer nr 2: corr2data b, means(8.3333333)
>
>sum  a b
>
>    Variable |       Obs        Mean    Std. Dev.       Min        Max
>-------------+--------------------------------------------------------
>           a |        12    8.333333           0   8.333333   8.333333
>           b |        12    8.333333           1   6.919311   9.956305
>
>. total a b
>
>Total estimation                    Number of obs    =      12
>
>--------------------------------------------------------------
>             |      Total   Std. Err.     [95% Conf. Interval]
>-------------+------------------------------------------------
>           a |        100          0             .           .
>           b |        100   3.464102      92.37556    107.6244
>--------------------------------------------------------------
>
>HTH and Kind Regards,
>
>Carlo
>-----Messaggio originale-----
>Da: [email protected]
>[mailto:[email protected]] Per conto di Torben
>Mideksa
>Inviato: giovedì 20 novembre 2008 9.18
>A: [email protected]
>Oggetto: st: Data generating
>
>Dear Statalist participants,
>
>I have a list of annual data like
>
>Year		variable_X		variable_Y ...
>1900		a			b
>.		.			.
>.		.			.
>.		.			.
>1950		c			d
>
>For some reasons, based on annual data alone, I am interested in
>generating monthly data for the two or more variables, assuming the
>monthly data has zero variance with the average value for each month
>amounting to annual value divided by 12. That is, I need
>
>Year		variable_X		variable_Y ...
>1900M1		a/12			b/12
>1900M2		a/12			b/12
>1900M3		a/12			b/12
>.		.			.
>.		.			.
>.		.			.
>1900M12		a/12			b/12
>.		.			.
>.		.			.
>.		.			.
>1950M12		c/12			d/12
>
>Question nr 1: How do I do this in stata?
>Question nr 2: How do I do it in stata if I want to assume a non-zero
>variance still maintaining the sum of the monthly data equals the annual
>data?
>
>Thanks in advance for your help.
>
>
>
>
>*
>*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index