Statalist


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

R: R: st: Bootstrapping new observations to add to an existing dataset


From   "Carlo Lazzaro" <[email protected]>
To   <[email protected]>
Subject   R: R: st: Bootstrapping new observations to add to an existing dataset
Date   Mon, 22 Jun 2009 18:49:44 +0200

Dear Maarten,
thanks a lot for the correction.

I was thinking of the beta binomial conjugacy under the Bayesian framework.
But here the matter is different.

I do hope that everything is fine with you and hope to have the pleasant
chance to meet you again.

Kind Regards,
Carlo

-----Messaggio originale-----
Da: [email protected]
[mailto:[email protected]] Per conto di Maarten buis
Inviato: lunedì 22 giugno 2009 17.51
A: [email protected]
Oggetto: Re: R: st: Bootstrapping new observations to add to an existing
dataset


--- On Mon, 22/6/09, Carlo Lazzaro wrote:
> you can use -invibeta- for creating random observation with
> given parameters a and b (in Stata 9.2/SE it goes like
> this: g A=invibeta(a,b,uniform()) for binary variables.

This will create a random variable from a continuous 
distribution (the beta distribution) whose values are bound
between 0 and 1. To create a binary variable you can type:
-gen A = runiform() < .5-. For more on this see:
Maarten L. Buis (2007) Stata tip 48: Discrete uses for 
uniform(). The Stata Journal, 7(3):434--435.
http://www.stata-journal.com/article.html?article=pr0032

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany

http://home.fsw.vu.nl/m.buis/
-----------------------------------------




      

*
*   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