Hello,
I have some problems using the maximum likelihood command of Stata to estimate a probit model.
Here is a simplified example of my problem: I am interested in estimating the effect of past experienced stock market returns of households on their stock market participation (controlling for other household characteristics).
This is my likelihood function:
-----------------------------------------------------------------------------------------------------
capture program drop nlprobitlf_stock
program nlprobitlf_stock
version 11
args lnfj xb b k
tempvar xnl
global lambda = `k'
rmatcalc_stock
quietly generate double `xnl' = w
drop w
quietly replace `lnfj' = lnnormal(`xb'+`b'*`xnl') if ($ML_y1 == 1)
quietly replace `lnfj' = lnnormal(-`xb'-`b'*`xnl') if ($ML_y1 == 0)
end
----------------------------------------------------------------------------------------------------
where rmatcalc_stock is a function that calculates the weighted sum of the stock returns a household experienced during its lifetime. The weights depend on k, which should also be estimated within the probit model.
This is my code for the optimization problem:
--------------------------------------------------------------------------------------------------------------------------------
ml model lf nlprobitlf_stock (`dependent_var' = `controls') /b /k [pweight = wgt]
ml search /// search initial value
ml maximize, difficult technique (bhhh) nonrtolerance
---------------------------------------------------------------------------------------------------------------------------------
If I run this, I get the following error message:
initial: log pseudolikelihood = -2.388e+08
rescale: log pseudolikelihood = -3395333.6
rescale eq: log pseudolikelihood = -3385030.8
Iteration 0: log pseudolikelihood = -3385030.8
Iteration 1: log pseudolikelihood = -2737459.7 (not concave)
Iteration 2: log pseudolikelihood = -2685007.4
Iteration 3: log pseudolikelihood = -2681058.8 (not concave)
Iteration 4: log pseudolikelihood = -2680772 (not concave)
Iteration 5: log pseudolikelihood = -2680771.5
Iteration 6: log pseudolikelihood = -2680524.6
Iteration 7: log pseudolikelihood = -2680520.2
Iteration 8: log pseudolikelihood = -2680520.2 (backed up)
option technique() not allowed
Does anyone know where this error may come from? Thank you very much in advance!
Related Posts with ml maximize, technique(bhhh): option technique() not allowed
Meta-analysis Ipdmetan (ssc) versus meta forestplotHi, I am doing meta-analysis for individual patient data. I get different overall results when I us…
Quantile regression with pweights, cluster standard errors and strata fixed effectsHi! I need to run a cross-sectional quantile regression with pweights, strata fixed effects and clus…
How to Conduct the Pre and Post Analysis?Dear all, I have panel data from 2015 to 2019, i want to check pre period 2015 and 2016 descriptive …
Postfile only posts results of first iteration of the loopDear statalist, I have a big file that overwhelms my memory when I try to run my script. Therefore,…
How to Conduct the Pre and Post Analysis?Dear all, I have panel data from 2015 to 2019, i want to check pre period 2015 and 2016 descriptive …
Subscribe to:
Post Comments (Atom)
0 Response to ml maximize, technique(bhhh): option technique() not allowed
Post a Comment