Hello, dear statalist users.
I'm new here and I don't really know how this works, I hope someone can help me with my issue.
I'm currently estimating a Tobit model censored at 0. However, as I'm working with daily data the model may suffers of Heteroskedasticity so I have to correct it. I've searched in the literature and I find some papers that use a Tobit model that explicitly models the error with a GARCH process, and it's defined as a Tobit-GARCH model.
I'm trying to replicate this kind of model in Stata with the maximization of the Log-likelihood function for the Tobit but accouting a GARCH(1,1) process in the error variance term,
The following is the Maximum-likelihood function that Stata maximazes with the "tobit" command.

I was able to replicate it with an entire code so I can add the GARCH process later:
I use a public Stata dataset to probe my code
sysuse auto, clear
**I created a random dependient variable just to fit the model gen y = 0 replace y = -0.9*y[_n-1] + rnormal(2,1) in 2/74 **This is the censoring in 0 replace y=0 if y < 0 *26 real changes
**This is the Likelihood function capture program drop mytobit program mytobit args lnf xb sigma tempvar lnlj quietly { gen double `lnlj'= log(1-normal(`xb'/`sigma')) if $ML_y1==0 replace `lnlj'= log((1/`sigma')*normalden(($ML_y1-`xb')/`sigma')) if $ML_y1>0 replace `lnf' = `lnlj' } end ml model lf mytobit (y = length price trunk) /sigma ml maximize, nolog estimate store tob tobit y length price trunk estimate store tob1 esttab tob tob1 The results are exactly the same so till this point I assume the code is correct. However, when I try to add the GARCH process I have a problem. Basically what I did was to replace the sigma value above for an explicit GARCH process, as follows:
gen double `err'=$ML_y1-`xb'
gen double `ext'=`err'[_n-1]
gen double `h'=`omega'/(1-`alpha1'-`beta')
replace `h'=`omega'+`alpha1'*`h'[_n-1]+`beta'*`ext'^2 if _n>1
In this case, `h' represents the conditional variance and as you see, it follows a GARCH(1,1) process. What I did was to replace `h' instead of `sigma' and try to maximize the adjusted Tobit Log-likelihood function accounting to a GARCH process in the first code.
However, Stata gives me the following result:
initial: log-likelihood = -<inf> (could not be evaluated)
> searching for feasible values
> ..................................................
> could not find feasible values
> r(491);
I already tried with different initial values but the problem persists so I ran out of ideas
Does anyone know how should I modify my code? Or can someone help me with my problem, please? I really don't know what to do know
Any suggestions would be appreciated.
Thank you very much.
I'm new here and I don't really know how this works, I hope someone can help me with my issue.
I'm currently estimating a Tobit model censored at 0. However, as I'm working with daily data the model may suffers of Heteroskedasticity so I have to correct it. I've searched in the literature and I find some papers that use a Tobit model that explicitly models the error with a GARCH process, and it's defined as a Tobit-GARCH model.
I'm trying to replicate this kind of model in Stata with the maximization of the Log-likelihood function for the Tobit but accouting a GARCH(1,1) process in the error variance term,
The following is the Maximum-likelihood function that Stata maximazes with the "tobit" command.
I was able to replicate it with an entire code so I can add the GARCH process later:
I use a public Stata dataset to probe my code
sysuse auto, clear
**I created a random dependient variable just to fit the model gen y = 0 replace y = -0.9*y[_n-1] + rnormal(2,1) in 2/74 **This is the censoring in 0 replace y=0 if y < 0 *26 real changes
**This is the Likelihood function capture program drop mytobit program mytobit args lnf xb sigma tempvar lnlj quietly { gen double `lnlj'= log(1-normal(`xb'/`sigma')) if $ML_y1==0 replace `lnlj'= log((1/`sigma')*normalden(($ML_y1-`xb')/`sigma')) if $ML_y1>0 replace `lnf' = `lnlj' } end ml model lf mytobit (y = length price trunk) /sigma ml maximize, nolog estimate store tob tobit y length price trunk estimate store tob1 esttab tob tob1 The results are exactly the same so till this point I assume the code is correct. However, when I try to add the GARCH process I have a problem. Basically what I did was to replace the sigma value above for an explicit GARCH process, as follows:
gen double `err'=$ML_y1-`xb'
gen double `ext'=`err'[_n-1]
gen double `h'=`omega'/(1-`alpha1'-`beta')
replace `h'=`omega'+`alpha1'*`h'[_n-1]+`beta'*`ext'^2 if _n>1
In this case, `h' represents the conditional variance and as you see, it follows a GARCH(1,1) process. What I did was to replace `h' instead of `sigma' and try to maximize the adjusted Tobit Log-likelihood function accounting to a GARCH process in the first code.
However, Stata gives me the following result:
initial: log-likelihood = -<inf> (could not be evaluated)
> searching for feasible values
> ..................................................
> could not find feasible values
> r(491);
I already tried with different initial values but the problem persists so I ran out of ideas
Does anyone know how should I modify my code? Or can someone help me with my problem, please? I really don't know what to do know
Any suggestions would be appreciated.
Thank you very much.