Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: RE: iid draw from a truncated normal distribution


From   "Martin Weiss" <[email protected]>
To   <[email protected]>
Subject   st: RE: RE: iid draw from a truncated normal distribution
Date   Mon, 22 Sep 2008 15:48:55 +0200

Did you mean "P(z>2 | mean=0, sd=0.5)"?
For the standard normal, values bigger than 2 are not that uncommom

**********
di in red 1-normal(2)
.02275013
**********


HTH
Martin


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Steichen, Thomas
J.
Sent: Monday, September 22, 2008 3:30 PM
To: '[email protected]'
Subject: st: RE: iid draw from a truncated normal distribution


P(z>2 | mean=0, sd=1) = .000031 (about 3 in 100,000).

Thus it is quite unlikely that the extremes in a sample of 10,000 will
approach or exceed +/- 2. So, your truncation points are not shifted;
rather, they are so extreme as to be seldom reached (thus the _apparent_
truncation points will be well within +/- 2).

-----------------------------------
Thomas J. Steichen
[email protected]
-----------------------------------

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Alexander Kalb
Sent: Monday, September 22, 2008 9:18 AM
To: [email protected]
Subject: st: iid draw from a truncated normal distribution

I would like to create an iid draw form a truncated normal distribution
(on the left and right side) with standard deviation 0.5 (in the
untruncated case). I tried the following commands:

set obs 10000
gen c = -2  /*left truncation point*/
gen d = 2 /*right truncation point*/
gen stdv = 0.5  /*standard deviation*/
gen v = uniform()
gen c_bar = c/stdv
gen d_bar = d/stdv
gen v_bar = (normal(c_bar) + (normal(d_bar) - normal(c_bar))*v)
gen u = stdv*invnorm(v_bar)

This seems to work but it shifts the truncation points below 2 and
above -2. Has anybody an idea how I can get an iid draw (with standard
deviaton of 0.5 in the untruncated case) which does not shift the
truncation points?

Zentrum f�r Europ�ische Wirtschaftsforschung GmbH (ZEW)
Centre for European Economic Research
L 7, 1 � 68161 Mannheim � Germany
Sitz der Gesellschaft: Mannheim � Amtsgericht Mannheim HRB 6554
Aufsichtsratsvorsitzender: Gerhard Stratthaus MdL, Finanzminister a.D.
Geschaeftsfuehrer: Prof. Dr. Dr. h.c. mult. Wolfgang Franz, Thomas Kohl
------------------------------------------------------------------------
*
*   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/

CONFIDENTIALITY  NOTE:  This e-mail message, including any attachment(s),
contains information that may be confidential, protected by the
attorney-client or other legal privileges, and/or proprietary non-public
information. If you are not an intended recipient of this message or an
authorized assistant to an intended recipient, please notify the sender by
replying to this message and then delete it from your system. Use,
dissemination, distribution, or reproduction of this message and/or any of
its attachments (if any) by unintended recipients is not authorized and may
be unlawful.

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