Statalist


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

RE: st: predictions from ML program


From   marcel spijkerman <[email protected]>
To   <[email protected]>
Subject   RE: st: predictions from ML program
Date   Wed, 11 Jun 2008 07:51:53 +0000

Predict is indeed useful but what I need is the contribution to the likelihood for each of the four terms in the likelihood (in:


ln(p1*L1 + p2*L2 + p3*L3 + (1-p1-p2-p3)*L4)

The model is a bivariate survival model with discrete heterogeneity distribution; and the terms in the likelihood are contributions for each person of the two duration processes. Can I obtain the separate contributions L1, L2, L3 and L4 by using predict or other postestimation commands?

Marcel




> From: [email protected]
> To: [email protected]
> Subject: st: predictions from ML program
> Date: Tue, 10 Jun 2008 14:08:37 +0100
>
>> ------------------------------
>>
>> Date: Mon, 9 Jun 2008 12:26:39 +0000
>> From: marcel spijkerman 
>> Subject: RE: st: predictions from ML program
>>
>> Thanks Maarten for your suggestions. Let me explain what I
>> mean by 'efficiently'; I am a GAUSS user but now I am
>> 'forced' to use STATA. For example; to calculate the quantity
>> b'X where b' is a vector of estimated parameters, I do know
>> how to call these parameters (e(b)) but to compute b'X I do
>> not know other than:
>>
>>
>> b0 + b1*x1 + b2*x2 ........
>>
>> So every time I change the specification I have to adjust
>> these lines. It would be handy to know of some procedure that
>> automates this to some extent and I do not know where to look
>> in Stata (I tried something with 'foreach'????).
>
> Welcome to Stata! Many of the operations that you have to write yourself in
> Gauss are easily done using built-in commands in Stata.
>
> Creation of a linear index like "b0 + b1*x1 + b2*x2 + ..." where the b s are
> estimated parameters is easily done after an estimation command using
> -predict-. Look at the postestimation tools associated with the relevant
> command.
>
> Also look at commands like -matrix score-
>
> You could also use Mata within Stata: it is a matrix programming language in
> the way that Gauss is. But I doubt you need it for the sort of operation
> you have mentioned.
>
> Stephen
> ---------------------------------------------------
> Professor Stephen P. Jenkins 
> Director, 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/teaching/degree/stephenj/ec968/
>
> Learn about the UK's new household panel survey, the United Kingdom
> Household
> Longitudinal Study: http://www.iser.essex.ac.uk/ukhls/
>
>
> *
> * For searches and help try:
> * http://www.stata.com/support/faqs/res/findit.html
> * http://www.stata.com/support/statalist/faq
> * http://www.ats.ucla.edu/stat/stata/

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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