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

From |
Linn Renée Naper <linn.naper@ecgroup.no> |

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

Subject |
RE: st: RE: Manipulation of the distribution |

Date |
Mon, 10 Nov 2008 16:06:08 +0100 |

Thanks I don't know what happened to the formatting (sending from a hotmail-account, a meant to send in plain text-format). I'm trying ones more using a another email-account... Maybe, I can reformulate my problem a little. What I actually are trying to do is to manipulate hourly electricity prices by adding a stochastic element. Like "price + u". The element u should have a given distribution - so that's way I need to generate a new variable with a given mean and standard deviation. Therefor I am trying to learn more one how Stata actually define new random variables. What does the "set seed" option in invnorm actually do? Next, I will add this element to the price at random. The prices can be grouped in different ways, by day, week etc. I aim at doing different manipulations, for example increasing the sd of the daily prices by a given factor, but let it be random which prices are decreased and increased. I could also let it be random how large the daily increase is for different weeks. Important here is thus that all prices are identified by weekday, weeknumber and year. Is there a good way to imply a new "shape" to an already excisting distribution of prices. For example if you have a prices with kernel density with "one peak", and you like to change the distribution so that is has "two peaks". Hard to figure out your email in my Outlook (weird formatting, of the code in particular). You want to look at -ssc d rnd- -h sample- the former because you run Stata9: Stata 10.1 now comes with built-in random number functionality. BTW, -ret list- is very much unnecessary in a loop. This command just serves to acquaint you with the return list, but is of no use in the loop... HTH Martin * * 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**:**RE: st: RE: Manipulation of the distribution***From:*"Martin Weiss" <martin.weiss1@gmx.de>

- Prev by Date:
**RE: st: insheet delimiter problem** - Next by Date:
**RE: st: RE: Manipulation of the distribution** - Previous by thread:
**st: Match merge with message _merge=3 and _merge=5 ?** - Next by thread:
**RE: st: RE: Manipulation of the distribution** - Index(es):

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