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

From |
"Nick Cox" <n.j.cox@durham.ac.uk> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: Data generating |

Date |
Fri, 21 Nov 2008 12:22:09 -0000 |

I guess many people found the question a bit obscure -- or the answer that occurred to them seemingly too obvious that it seemed that someone else would say it. If the requirement is just non-zero variance then one solution is just to add random noise with desired distribution and specified variance. (Presumably also with zero mean.) But it is difficult to see how that could be of scientific or statistical interest. What is missing here is any information on seasonality, i.e. whatever your data, economic, biomedical, something else, there is likely to be an expectation of seasonality, and only you can say how that is best to be imputed when cooking up a monthly series from annual data. Remember we know nothing about your data and your problem that you haven't told us. In fact, I don't think there is anything substantive here to use as leverage in advice. There can be hardly be a trick regardless of context to impute seasonality, as seasonality takes many different forms. Nick n.j.cox@durham.ac.uk Torben Mideksa 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. Carlo Lazzaro 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 >-------------------------------------------------------------- Torben Mideksa >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? * * 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/

**Follow-Ups**:**st: RE: RE: RE: Data generating***From:*"Torben Mideksa" <torben.mideksa@cicero.uio.no>

**References**:**st: Data generating***From:*"Torben Mideksa" <torben.mideksa@cicero.uio.no>

**st: R: Data generating***From:*"Carlo Lazzaro" <carlo.lazzaro@tiscalinet.it>

**st: RE: Data generating***From:*"Torben Mideksa" <torben.mideksa@cicero.uio.no>

- Prev by Date:
**st: Instrument validity** - Next by Date:
**st: RE: how to transfer scalars from Mata to Stata for a simulation?** - Previous by thread:
**st: RE: Data generating** - Next by thread:
**st: RE: RE: RE: Data generating** - Index(es):

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