Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: creating theoretical distribution


From   "Wolney Conde" <[email protected]>
To   "statalist" <[email protected]>
Subject   st: creating theoretical distribution
Date   Mon, 11 Nov 2002 10:31:19 -0200 (Hor. de ver�o leste da Am. Sul)

Dear listers,
I want to perform a graphical analysis called "worm plot"; it is a detrended plot, where one plots the difference between the empirical and theoretical distributions (y axis) against the theoretical distribution (x axis).
I've obtained the empirical Z distribution and I need to generate the theoretical distribution within age ranges. I have tried the following:
egen ndist_t = rank(emp_z),by(agerange)
egen Ndist_t = count(emp_z),by(agerange)
gen zdist_t = n/(N+1)
replace zdist_t = invnorm(zdist_t)
At the end I imagine to have obtained the theoretical distribution to my (Z) sample.
Am I right? If so, is there some way more appropriated to do it?
Many thanks in advanced,
Wolney.    
_______________________________________________
IncrediMail - Email has finally evolved - Click Here



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