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: using invnorm uniform to normalize my liquidity measure


From   Maarten Buis <[email protected]>
To   [email protected]
Subject   Re: st: using invnorm uniform to normalize my liquidity measure
Date   Tue, 21 May 2013 13:58:24 +0200

On Tue, May 21, 2013 at 12:17 PM, Yori van der Kruijs wrote:
> However, when i try to normalize my illiq measure, by using the -rnormal(m,s)- formula, using this code:
>    bysort permno dm: gen normliq=rnormal(0.25, 0.30*illiq)
> I still obtain different values for each observation for a specific firm within the same month, while my illiq value is measured monthly, so does not change within the month.

This is because the -rnormal()- function is drawing a random number
from a normal distribution, so it should never be used to standardize
a variable. I suppose that what you want to use is first create the
plotting position of each observation and than use the inverse
cumulative densitiy function of the normal distribution to turn these
in (quasi-)standardized values.

Notice, that this way all you use from your observed data is the rank
order; the distances between the "standardized" values are only there
because of your assumption of a normal distribution. I find that
extremely troubeling, in that it suggests an empirical value when no
such empirical content exists.

Having given enough warning that you should not do so, here is an
example of how to do this bad thing:

*------------------ begin example ------------------
sysuse auto, clear
by foreign, sort: egen n = count(price)
by foreign: egen i = rank(price)
gen ppos = i / (n + 1)
gen stand = invnormal(ppos)
*------------------- end example -------------------
 (For more on examples I sent to the Statalist see:
 http://www.maartenbuis.nl/example_faq )

Hope this helps,
Maarten

---------------------------------
Maarten L. Buis
WZB
Reichpietschufer 50
10785 Berlin
Germany

http://www.maartenbuis.nl
---------------------------------
*
*   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