Tiago, check in the following code block for b1 macro lacking the `'
quotes - offending line marked with !!!.
quietly {
tempvar vb2 vb1 corr cov L
scalar taub2=exp(`logtb2')
scalar mub1=`mub2'*`lambda'
gen double `vb1'=(`v11'+`lambda'^2*taub2)
gen double `vb2'=( taub2 +`v22')
gen double `cov'=(`lambda'*taub2 +`v12')
gen double `corr'= `cov'/sqrt(`vb2'*`vb1')
gen double `L'= ln(`vb1'*`vb2'*(1-`corr^2')) + /*
*/ ( (`b1' - mub1 )^2/`vb1' + /*
*/ (`b2' -`mub2')^2/`vb2' - /*
!!! */ 2*`corr'*(b1 - mub1)*(`b2' -
`mub2')/sqrt(`vb2'*`vb1') )/*
*/ /(1-`corr'^2)
replace `lnl'=-0.5*`L' - 0.5*ln(2*_pi)
}
DCElliott
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/