Changeset 9d2f1cb in tol


Ignore:
Timestamp:
Feb 18, 2009, 2:02:24 PM (18 years ago)
Author:
Víctor de Buen <vdebuen@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
c2df3a3
Parents:
9946bee
Message:

Fixed bug in log of density

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@604 be4846ae-f051-483a-831f-b64e7d08527f

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/arima/_arma_process.tol

    r9946bee r9d2f1cb  
    334334    ////////////////////////////////////////////////////////////////////////////
    335335    {
    336       Sub(u, 1,     1, _.p, 1)
     336      Sub(u, 1, 1, _.p, 1)
    337337    };
    338338    ////////////////////////////////////////////////////////////////////////////
    … …  
    348348    VMatrix _.a   = DifEq(_.ar/_.ma, _.z, _.z0, _.a0);
    349349    Real _0.5_m_log2_PI_s2 = -0.5*_.m*Log(2*PI*_.s2);
    350     Real _.logLH = _0.5_m_log2_PI_s2 - 0.5*_.m*
    351     ( 
    352       _.det_cov_z/_.m +
    353       (VMatMoment(_.a,2) + VMatMoment(_.u,2))/_.s2 
     350
     351    Real aa = MatDat(VMat2Mat( Tra(_.a)*_.a), 1,1);     
     352    Real uu = MatDat(VMat2Mat( Tra(_.u)*_.covi_u*_.u),1,1);
     353    Real _.logLH = _0.5_m_log2_PI_s2 - 0.5*
     354    (
     355      _.det_cov_z+(aa+uu)/_.s2
    354356    );
    355357
Note: See TracChangeset for help on using the changeset viewer.