Changeset a7c852e in tol
- Timestamp:
- Feb 2, 2009, 11:27:13 AM (18 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 1656777
- Parents:
- c18556c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tol/stdlib/math/stat/models/bayesian/bysMcmc/bsr/dynhlm/_db_api.tools.modses.pri.tol
rc18556c ra7c852e 99 99 Eval("ModSes.Pri.Homog_1.Create."+id_node+".ok=ok") 100 100 }; 101 102 101 ////////////////////////////////////////////////////////////////////////////// 103 102 /* … … 109 108 Relevant arguments are: 110 109 111 Set PriorInfo: Set of Sets, specifies the averages and sigma's of each node110 Set PriorInfo: Set of NameBlocks, specifies the averages and sigma's of each node 112 111 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 ]] 120 119 121 120 Set node_childs: Set Of NameBlocks, specifies the node and parameter's name of … … 138 137 Text description, 139 138 Real number, 140 Set PriorInfo, // [[ [[ mu_1,sigma_1 ]], 141 // [[ mu_2,sigma_2 ]], 142 // ........... 143 // ]] 139 Set PriorInfo, 144 140 Set node_childs, //Set de NameBlocks 145 141 Matrix Y) … … 165 161 ); 166 162 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, 170 168 i, 171 P riorInfo[i][1],172 P riorInfo[i][2],169 PInfo::_.average, 170 PInfo::_.sigma, 173 171 sigmaPriorWeight); 174 172 … … 190 188 Eval("ModSes.Pri.Out.Comb.Create."+id_node+".ok=ok") 191 189 }; // Fin de la funcion ModSes.Pri.Out.Comb.Create 192 Code PutDescription ("fulano",Code ModSes.Pri.Out.Comb.Create); 193 190 Code PutDescription (" 191 Implements 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 196 Relevant arguments are: 197 198 Set 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 208 Set 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.
