Changeset a7c852e in tol


Ignore:
Timestamp:
Feb 2, 2009, 11:27:13 AM (18 years ago)
Author:
Miguel Ángel Fernández <mafernandez@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
1656777
Parents:
c18556c
Message:

Correción en la función ModSes.Pri.Out.Comb.Create, cambiado el argumento Set PriorInfo

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/dynhlm/_db_api.tools.modses.pri.tol

    rc18556c ra7c852e  
    9999  Eval("ModSes.Pri.Homog_1.Create."+id_node+".ok=ok")
    100100};
    101 
    102101//////////////////////////////////////////////////////////////////////////////
    103102/*
    … …  
    109108Relevant arguments are:
    110109
    111 Set PriorInfo: Set of Sets, specifies the averages and sigma's of each node
     110Set PriorInfo: Set of NameBlocks, specifies the averages and sigma's of each node
    112111               equation
    113                Set PriorInfo = [[   
    114                              [[  mu_1, sigma_1  ]],
    115                              [[  mu_2, sigma_2  ]],
    116                                   ...........
    117                              [[  mu_n, sigma_n ]]
    118                      
    119                            ]]
     112               Set PriorInfo = Set de NameBlocks
     113                             [[
     114
     115              NameBlock equ1 = [[ _.average, _.sigma, _.sigmaPriorWeight ]]
     116              NameBlock equ2 = [[ _.average, _.sigma, _.sigmaPriorWeight ]]
     117              ...
     118                              ]]
    120119
    121120Set node_childs: Set Of NameBlocks, specifies the node and parameter's name of
    … …  
    138137                               Text description,
    139138                               Real number, 
    140                                Set  PriorInfo, // [[ [[ mu_1,sigma_1 ]],
    141                                                //    [[ mu_2,sigma_2 ]],
    142                                                //       ........... 
    143                                                // ]]
     139                               Set  PriorInfo,
    144140                               Set  node_childs, //Set de NameBlocks
    145141                               Matrix Y)
    … …  
    165161    );
    166162
    167     Real ok.2 = SetMin ( For (1, Rows(Y), Real (Real i){//ciclo ecuaciones nodo
    168       Real sigmaPriorWeight = If(Card(PriorInfo[i])==3,PriorInfo[i][3],?);
    169           Real ModSes.Pri.Equ.Create (dbName, model, session, id_node,
     163    Real ok.2 = SetMin ( For (1, Card(PriorInfo), Real (Real i){//ciclo ecuaciones nodo
     164            NameBlock PInfo = PriorInfo[i];   
     165            Real sigmaPriorWeight = If(ObjectExist("Real","PInfo::_.sigmaPriorWeight"),
     166                                                PInfo::_.sigmaPriorWeight, ?);
     167            Real ModSes.Pri.Equ.Create (dbName, model, session, id_node,
    170168                      i,
    171                       PriorInfo[i][1],
    172                       PriorInfo[i][2],
     169                      PInfo::_.average,
     170                      PInfo::_.sigma,
    173171                      sigmaPriorWeight);
    174172                     
    … …  
    190188     Eval("ModSes.Pri.Out.Comb.Create."+id_node+".ok=ok")
    191189}; // Fin de la funcion ModSes.Pri.Out.Comb.Create
    192 Code PutDescription ("fulano",Code ModSes.Pri.Out.Comb.Create);
    193 
     190Code PutDescription ("
     191Implements an a priori node for combinatorial output:
     192
     193/Sum_j Y^{ij}*beta_j ~ N (mu_i, sigma_i).  j = 1, ....., m-parameters
     194                                           i = 1, .... , n-node equations
     195
     196Relevant arguments are:
     197
     198Set PriorInfo: Set of NameBlocks, specifies the averages and sigma's of each node
     199               equation
     200               Set PriorInfo = Set de NameBlocks
     201                             [[
     202
     203              NameBlock equ1 = [[ _.average, _.sigma, _.sigmaPriorWeight ]]
     204              NameBlock equ2 = [[ _.average, _.sigma, _.sigmaPriorWeight ]]
     205              ...
     206                              ]]
     207
     208Set node_childs: Set Of NameBlocks, specifies the node and parameter's name of
     209                 each beta_j
     210
     211 Set  node_childs = [[
     212
     213       NameBlock  beta1 = [[  Text _.id_node =   , Text _.id_parameter=   ]],
     214       NameBlock  beta2 = [[  Text _.id_node =   , Text _.id_parameter=   ]],
     215       ................
     216       NameBlock  betaj = [[  Text _.id_node =   , Text _.id_parameter=   ]]
     217     
     218                    ]]",Code ModSes.Pri.Out.Comb.Create);
Note: See TracChangeset for help on using the changeset viewer.