> ------------------------------
>
> Date: Mon, 9 Jun 2008 12:26:39 +0000
> From: marcel spijkerman <[email protected]>
> 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 <[email protected]>
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/