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]

Re: st: generating synthetic data with a negatively skewed distribution?


From   Gwinyai Masukume <[email protected]>
To   [email protected]
Subject   Re: st: generating synthetic data with a negatively skewed distribution?
Date   Mon, 18 Mar 2013 20:53:13 +0200

thanks again Nick, sometimes one just needs an explanation to go round
that bend.
i now see things clearly.
kind regards,
gwinyai

On 3/18/13, Nick Cox <[email protected]> wrote:
> Why the uncertainty? It is apparent from e.g.
> http://en.wikipedia.org/wiki/Beta_distribution that a beta
> distribution with parameters a, b will be left-skewed if b < a; thus
> an example such as
>
> . gen x = rbeta(6, 1)
>
> generates a left-skewed distribution on [0, 1] Shift and scale to
> taste. If you want a particular skewness, you need to do some
> calculations first.
>
> Nick
>
> On Mon, Mar 18, 2013 at 6:07 PM, Gwinyai Masukume
> <[email protected]> wrote:
>> many thanks Nick. In my particular case, i'm not sure how to structure
>> the rbeta(a, b) argument. please kindly give an example.
>> kind regards,
>> gwinyai
>>
>> On 3/18/13, Nick Cox <[email protected]> wrote:
>>> If your criteria are no more than bounded support and negative skew,
>>> then a beta distribution is indeed one solution.
>>>
>>> See -help rbeta()-.
>>>
>>> Nick
>>>
>>> On Mon, Mar 18, 2013 at 2:55 PM, Gwinyai Masukume
>>> <[email protected]> wrote:
>>>
>>>> I'm using version 12.1.
>>>>
>>>> I'd like to generate synthetic data with a ? negatively skewed
>>>> distribution.
>>>>
>>>> gen x =3D int(1964+(1999-1964)*runiform())
>>>>
>>>> I would for example like a peak of events at say 1983, with more events
>>>> between 1983 and 1999 (with fewer events between 1964 and 1983).
>>>>
>>>> I suspect that drawing from a beta distribution may work?
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/faqs/resources/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/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index