Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: Re:storing values in arrays

From   "Mitrani, Alex" <>
To   <>
Subject   st: RE: Re:storing values in arrays
Date   Mon, 21 Jun 2004 11:47:50 +0100


Thanks very much.



-----Original Message-----
From: Kit Baum []
Sent: 19 June 2004 12:51
Subject: st: Re:storing values in arrays

On Jun 19, 2004, at 2:33 AM, Alex wrote:

> I am embarking on my first programming exercise with stata, and would 
> appreciate a little advice.  The task involves getting a model command 
> to iterate a number of times with a sub-set of the independent 
> variables being systematically modified each time using different 
> values of a scaling factor (say going from 0 to 5 in increments of 
> 0.1).  I need to retrieve the log likelihood of each model, and 
> display them alongside the corresponding values of the scaling factor. 
>  In this way the scalilng factor that results in the model best 
> fitting the data can be obtained.
> I am sure this is all possible, but having read the material in the 
> users' guide on programming stata, I cannot see a simple way of 
> storing the different values of the log likelihood in an array (I know 
> that this is very straight-forward in most other programming 
> languages), so that they can be conveniently displayed after the model 
> runs have been finished, for instance by looping a display command 
> over all the values contained in the array.

Along the lines of my post to Statalist on 4 Jun 2004, please see

which stores scalar results from a sequence of OLS regressions in an 


*   For searches and help try:

*   For searches and help try:

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