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

st: predictions from ML program

From   "Stephen P. Jenkins" <>
To   <>
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

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.

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
Survival Analysis using Stata:

Learn about the UK's new household panel survey, the United Kingdom
Longitudinal Study:

*   For searches and help try:

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