Statalist The Stata Listserver


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

st: Specifying a matrix containing starting values for the parameters of the model (revised)


From   [email protected]
To   <[email protected]>
Subject   st: Specifying a matrix containing starting values for the parameters of the model (revised)
Date   Tue, 11 Apr 2006 18:34:14 +0100

Dear Statalisters,
I am using a random effects probit model while accounting for the initial
conditions problem. I have already implemented Wooldridge's solution JAE
2005 and currently I am implementing the Heckman 1981 approach with the
redprob command from Prof Mark Stewart,-redprob- A Stata program for the
Heckman estimator of the random effects dynamic probit model, University of
Warwick, mimeo, 2006. 
The problem is that I cannot figure of a way to speficy the from () matrix
containing the initial parameters values. This is the relevant part of the
code:

/* Set up initial values. */
	tempname llrho0 b0 b00 b1 lllast b ll V b2
	if "`from'"=="" {
	di _n in gr "Pooled Probit Model for t>1"
	probit `y' `xvars' if `touse' & `t'>1
	scalar `llrho0' = _result(2)
	matrix `b0' = get(_b)
	matrix coleq `b0' = `y'

	di _n in gr "Probit Model for t=1"
	probit `y' `zvars' if `touse' & `t'==1
	scalar `llrho0' = `llrho0'+_result(2)
	matrix `b00' = get(_b)
	matrix coleq `b00' = rfper1
	matrix `b0' = `b0' , `b00'

	matrix `b1' = (-0.5, 0)
	matrix colnames `b1' = logitrho:_cons ltheta:_cons
	matrix `b0' = `b0' , `b1'
	}
	else {
	mat `b0' = `from'
	}

The default for the "from" matrix uses a pooled probit for t>1 and a
separate probit for the intial period.  In the example of the mimeo Stewart
(2006) defines it as: from (bstart1) but when I choose something like this
the command does not work. What I get is just the pooled probit model and
then a warning message saying no observations for the probit model t=1. I do
not see how the default works and I have tried many many different matrices
such as b0, e(b) etc etc without any result. If I use the following:
redprob neworgmb neworgmblag age (age lfbanfin lffbanfin), i(pid) t(year)
quadrat(30) 
from(e(b)) 
I get this:

Dependent variable = neworgmb
x-variables = neworgmblag age 
z-variables = age lfbanfin lffbanfin
Assumed lagged dependent variable = neworgmblag

Iterations for full ML estimation

----------------------------------------------------------------------------
--
Iteration 0:
Coefficient vector:
       neworgmb:    neworgmb:    neworgmb:      rfper1:      rfper1:
rfper1:      rfper1:    logitrho:      ltheta:
    neworgmblag          age        _cons          age     lfbanfin
lffbanfin        _cons        _cons        _cons
r1     2.610615     .0075474     -1.73626            0            0
0            0            0            0

could not calculate numerical derivatives
flat or discontinuous region encountered
r(430);

. 

Would be most grateful if someone could help. 
Georgios


*
*   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