Statalist


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

st: GB2 question


From   "Stephen P. Jenkins" <[email protected]>
To   <[email protected]>
Subject   st: GB2 question
Date   Fri, 1 Jan 2010 16:53:29 -0000

------------------------------

Date: Thu, 31 Dec 2009 08:00:37 -0800 (PST)
From: Jon Schwabish <[email protected]>
Subject: st: GB2 question

I've been toying around with the excellent GB2 packages put together
by Nick Cox & Stephen Jenkins and was hoping someone could help out
with a slight issue I'm facing.

Is there a way to fix the process so that I can estimate the same
predictions for the same people over multiple runs? That is, when I
run the following code it is not the case that x1=x2 (even when
setting a seed).

gb2fit inc, stats 
qgb2 inc, gen(x1)

gb2fit inc, stats 
qgb2 inc, gen(x2)

Ideally, I'd like to generate the same predictions for each person if
I run my program multiple times.

Also, does anyone know how to construct a picture of the pdf of the
GB2 distribution? 

Thanks and Happy New Year,
jon
==================

Thanks to Austin Nichols for his quick response to this query.

Like Austin, I'm puzzled by your reference to wanting to "generate the
same predictions for each person". You appear to have the parameters
set as scalars (not functions of covariates), so each "inc" value in
the data should get the same prediction.  Clarification of your
problem would, I think, require you to show us an example replicating
your problem with one of the data sets accompanying Stata (cf.
Austin's use of such a data set).

On Qn #2, recall that -gb2fit- (and its siblings like -smfit-,
-dagumfit-, etc., all on SSC), have options that allow you to create
new variables containing the pdf and cdf values associated with the
"inc" value of each obs -- call these variables pdf_hat and cdf_hat,
say.  You can then graph "pdf_hat" against "inc" using -graph twoway-



Stephen
-------------------------------------------------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research
University of Essex, Colchester CO4 3SQ, U.K.
Tel: +44 1206 873374.  Fax: +44 1206 873151.
http://www.iser.essex.ac.uk  
Survival Analysis using Stata:
http://www.iser.essex.ac.uk/iser/teaching/module-ec968 
Downloadable papers and software: http://ideas.repec.org/e/pje7.html



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