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

st: ml init: how to give a vector as starting values ?

From   "Olivier Paradis-Beland" <>
To   <>
Subject   st: ml init: how to give a vector as starting values ?
Date   Mon, 1 Dec 2003 14:22:35 -0500

Hi, I am estimating a simultaneous tobit model with the "ml" procedure.
In a first step, I ran two separate Tobit equations for each of the model's equation, in order to get some starting values for the parameters of the model.
As you will see, I have saved the vector of parameters in two vectors (namely "b" for beta and "d" for delta as well as to scalars representing the errors' standard errors for each models). Ideally these would serve as an input for the starting values of the model. However, when I give the "ml init" the name of the vectors as starting values I get an error message saying that Stata can only accept numbers as starting values (rather than the name of a vector).
Anyone can help ?
Thank you
Olivier Paradis Béland
use scf86_roc.dta, clear
gsort -revimp
local exog "tn ipe ne nb man sas alb cb age_16_24 age_25_34 age_35_44 age_55_69 homme celibataire marie chef_fam educ_0_8 educ_postsec educ_univ francais etranger famille en_0_24 etudiant"
**     starting values      ***********
tobit heures revimp `exog', ll(0)
matrix b=e(b)
scalar sigma_su=b[1,27]
tobit revimp `exog', ll(0)
matrix d=e(b)
scalar sigma_se=d[1,26]

ml model lf maxlik (beta: heures=revimp `exog')(alpha: revimp, nocons)(delta: revimp=`exog') /sig_u /sig_e /sig_ue 
ml init beta=b delta=d alpha=1 /sig_u=sigma_su /sig_e=sigma_se /sig_ue=0, skip
ml query
ml check
ml search, repeat(1000)
ml maximize, difficult
*set trace off
*log close

*   For searches and help try:

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