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]

st: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc...


From   "Stephen P. Jenkins" <[email protected]>
To   <[email protected]>
Subject   st: How to retrieve parameter estimates from an ML program, so they can be used in estimation of expected values, variances, etc...
Date   Tue, 30 Mar 2010 09:12:49 +0100

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

Date: Mon, 29 Mar 2010 12:54:31 +0100
From: SLG Brilleman <[email protected]>
Subject: st: How to retrieve parameter estimates from an ML
program, so they can be used in estimation of expected values,
variances, etc...

Hi

I have recently written a program for ml estimation using the
generalized 
Gamma distribution. The estimation routine seems to run fine and
will 
produce estimates of the coefficients for the linear predictor
(mu), and 
estimates of the two shape parameters (sigma and kappa).

My problem is that I want to estimate the expected value of yi
(i.e. the 
individual predictions) - an equation involving estimates of all
three 
parameters (mu, sigma, kappa). I am reasonably new to STATA and
cannot 
figure out the syntax to retrieve and store the estimates of mu,
sigma, and 
kappa, so that I can generate the new variable yi.

I have tried 'ereturn', 'scalar' and 'gen' statements both within
the 
program and externally after ml maximise (when outside the
program I have 
the additional problem of distinguishing between the two shape
parameters 
currently both _cons in the output).

Any help would be much appreciated! My code is currently along
the lines 
of...

<snip>

Thanks,
Sam.
++++++++++++++++++++++++++++++++

You have already received good advice from Nick Cox and Martin
Buis. In addition to that, if you wish to persist with your own
program for this model, you might profit from looking at code for
similar sorts of models. 

For example, use -viewsource-, and/or your favourite editor, to
peek at the code for programs such as -gb2fit-, -smfit- or
-dagumfit- or all the other -*fit- siblings -- all available on
SSC. 


Stephen
-------------------------------------
Professor Stephen P. Jenkins <[email protected]>
Institute for Social and Economic Research (ISER)
University of Essex, Colchester CO4 3SQ, UK
Tel: +44(0)1206 873374. Fax: +44(0)1206 873151
http://www.iser.essex.ac.uk 
Survival Analysis using Stata:
http://www.iser.essex.ac.uk/survival-analysis  
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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index