No announcement yet.
  • Filter
  • Time
  • Show
Clear All
new posts

  • GlLAMM Mixed latent variable

    Sorry I am using GLLAMM package and I would like to do a for cycle to find the best BIIC.
    I don't understand where is the problem.

    "error in remcor
    could not calculate numerical derivatives
    missing values encountered
    (error occurred in ML computation)
    (use trace option and check correctness of initial model)
    (probabilities will be stored in p_21 p_22 p_23 p_24 p_25 p_26 p_27 p_28)
    cannot compute posterior probabilities for more than 1 continuous latent variable

    Here is the code

    forvalues i=2/10 {

    * starting value
    eq idc1:a

    eq idc2:b

    *the model
    gllamm resp a b aHGE bsp blp bcp bgmr blog_Gov bequity agdp aupop afert_rate adependratio amav, /*
    */ i(id) nocons eqs(idc1 idc2) nrf(2) link(ident ident) family(gauss gauss) from(a) /*
    */ lv(var) fv(var) nip(`i') ip(f) skip

    * defining a matrix equal to
    matrix a_`i'=e(b)
    matrix a_=e(b)

    matrix loglik_`i'=e(ll)
    matrix np_`i' = colsof(a_`i')

    *posteriod values
    gllapred p_`i', p
    *predicted value
    gllapred bivpre_`i', linpred
    gllasim y_`i'
    gllapred locaz`i',u
    matrix locs`i'=e(zlc2)'
    matrix lp`i' = e(zps2)'

  • #2
    Welcome to Statalist.

    You have accidentally posted your topic in Statalist's Mata Forum, which is used for discussions of Stata's Mata language, which is different than Stata's command language and matrix commands that you are using. Your question will see a much larger audience if you post it in Statalist's General Forum.

    Also, if you have not already done so, take a look at the Statalist FAQ linked to at the top of this page for posting guidelines and suggestions.