Hello,
I am trying to estimate parameters of a utility function throu Simulated Maximum Likelihood.
My programe is showing an error message ""too few variables specified"... (image below) after ml check when I try to generate random draws through cholesky decomposition:
My sintax is:
...
. matrix W = (`sigma1' , `cov12' , `cov13' \ `cov12' , `sigma2' , `cov23' \ `cov13' , `cov23' , `sigma3')
. capture matrix U = cholesky(W)
. if _rc != 0 {
. di "Warning: cannot do Cholesky factorization of rho matrix"
. }
. local l11=U[1,1]
. local l21=U[2,1]
. local l31=U[3,1]
. local l22=U[2,2]
. local l32=U[3,2]
. local l33=U[3,3]
. forvalues r = 1/100{
. qui {
. gen double `random1' = randomc1_`r'*`l11'
HERE ml check shows the error message "too few variables specified"
. gen double `random2' = randomc2_`r'*`l22' + randomc1_`r'*`l21'
. gen double `random3' = randomc3_`r'*`l33' + randomc2_`r'*`l32' + randomc1_`r'*`l31'
MY SINTAX IS AN ADAPTATION OF PROFESSORS HAAN & UHLENDORFFF' "Estimation of Multinomial Logit Models with Unobserved Heterogeneity Using Maximum Simulated Likelihood"
I am confused because I don't know the exact reason of this message.
If any colleague could help me I would thank him a lot.
Best wishes,
Ernesto
I am trying to estimate parameters of a utility function throu Simulated Maximum Likelihood.
My programe is showing an error message ""too few variables specified"... (image below) after ml check when I try to generate random draws through cholesky decomposition:
My sintax is:
...
. matrix W = (`sigma1' , `cov12' , `cov13' \ `cov12' , `sigma2' , `cov23' \ `cov13' , `cov23' , `sigma3')
. capture matrix U = cholesky(W)
. if _rc != 0 {
. di "Warning: cannot do Cholesky factorization of rho matrix"
. }
. local l11=U[1,1]
. local l21=U[2,1]
. local l31=U[3,1]
. local l22=U[2,2]
. local l32=U[3,2]
. local l33=U[3,3]
. forvalues r = 1/100{
. qui {
. gen double `random1' = randomc1_`r'*`l11'
HERE ml check shows the error message "too few variables specified"
. gen double `random2' = randomc2_`r'*`l22' + randomc1_`r'*`l21'
. gen double `random3' = randomc3_`r'*`l33' + randomc2_`r'*`l32' + randomc1_`r'*`l31'
MY SINTAX IS AN ADAPTATION OF PROFESSORS HAAN & UHLENDORFFF' "Estimation of Multinomial Logit Models with Unobserved Heterogeneity Using Maximum Simulated Likelihood"
I am confused because I don't know the exact reason of this message.
If any colleague could help me I would thank him a lot.
Best wishes,
Ernesto
Comment