Hi,
I am trying to use a multivariatenormal distribution and is apparently
violating some rule of BUGS-syntax as I end up in a "trap".
Apparently it boils down to problems with coding as in the example below.
Help will be very much appreciated
Best
Carsten Hvingel
Pinngortitaleriffik/Greenland Inst. of Natural Resources
Box 570, DK-3900 Nuuk
Phone +299 321095
MODEL{
for (k in 1:K){
X[k,1:M]~dmnorm(mu[k,1:M],T[1:M,1:M,k])
}}
#DATA
list( M=14,K=3
mu=structure(
.Data=c(0.5608,3.4105,0.5608,2.4048,0.5608,0.9940,0.5608,0.5608,0.5608,0.560
8,0.5608,0.5608,0.5608,5.4380,
3.7093,0.3269,1.5344,6.4745,0.1896,0.0747,1.9085,0.3434,1.5495,0.3269,4.1630
,3.6229,3.0378,0.3269,
0.0106,0.7959,0.2528,6.0824,3.4844,1.0473,2.0077,0.8292,1.8181,1.2704,0.9955
,0.0573,0.0644,0.8757
),
.Dim=c(3,14)),
T=structure(
.Data=c(2.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000
0,0.0000,0.0000,0.0000,0.0000,
0.0000,8.3985,0.0000,-0.4709,0.0000,-2.3787,0.0000,0.0000,0.0000,0.0000,0.00
00,0.0000,0.0000,-4.3134,
0.0000,0.0000,2.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,-0.4709,0.0000,2.2774,0.0000,-3.3522,0.0000,0.0000,0.0000,0.0000,0.00
00,0.0000,0.0000,1.8561,
0.0000,0.0000,0.0000,0.0000,2.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,-2.3787,0.0000,-3.3522,0.0000,6.7418,0.0000,0.0000,0.0000,0.0000,0.00
00,0.0000,0.0000,-1.2282,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,2.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,2.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,2.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,2.0000,0.0000
,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,2.0000
,0.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,2.0000,0.0000,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,2.0000,0.0000,
0.0000,-4.3134,0.0000,1.8561,0.0000,-1.2282,0.0000,0.0000,0.0000,0.0000,0.00
00,0.0000,0.0000,4.1127,
2.3353,0.0000,-0.2273,-0.2462,-0.0590,0.7105,-0.3012,0.7815,-0.3641,0.0000,-
0.6790,-0.1519,-0.6131,0.0000,
0.0000,5.9880,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,0.0000,
-0.2273,0.0000,0.6160,0.3707,-0.0419,0.0877,0.0589,0.2011,-0.0666,0.0000,-0.
0106,-0.2693,-0.4474,0.0000,
-0.2462,0.0000,0.3707,1.9219,0.0499,0.3080,-0.1790,0.2824,-0.2238,0.0000,-0.
7051,-0.3807,-0.7766,0.0000,
-0.0590,0.0000,-0.0419,0.0499,3.3229,0.2111,0.0571,0.3175,-0.0550,0.0000,0.7
093,0.5513,0.1813,0.0000,
0.7105,0.0000,0.0877,0.3080,0.2111,7.1407,0.1447,1.2719,-0.2779,0.0000,0.648
7,0.2370,-0.3198,0.0000,
-0.3012,0.0000,0.0589,-0.1790,0.0571,0.1447,0.9714,0.0489,0.1033,0.0000,0.05
23,0.1455,-0.0447,0.0000,
0.7815,0.0000,0.2011,0.2824,0.3175,1.2719,0.0489,2.6352,-0.6094,0.0000,0.369
2,-0.1852,-0.4398,0.0000,
-0.3641,0.0000,-0.0666,-0.2238,-0.0550,-0.2779,0.1033,-0.6094,0.6258,0.0000,
0.0666,0.3111,0.7265,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,5.9880,0.0000
,0.0000,0.0000,0.0000,
-0.6790,0.0000,-0.0106,-0.7051,0.7093,0.6487,0.0523,0.3692,0.0666,0.0000,5.7
670,0.0222,-0.4020,0.0000,
-0.1519,0.0000,-0.2693,-0.3807,0.5513,0.2370,0.1455,-0.1852,0.3111,0.0000,0.
0222,0.7329,0.4753,0.0000,
-0.6131,0.0000,-0.4474,-0.7766,0.1813,-0.3198,-0.0447,-0.4398,0.7265,0.0000,
-0.4020,0.4753,2.6206,0.0000,
0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000
,0.0000,0.0000,5.9880,
50.7171,0.5783,0.0000,0.4518,-0.2225,0.3445,0.3154,1.0511,-0.7054,0.5307,-0.
7417,-0.8727,2.1101,0.0029,
0.5783,0.9714,0.0000,-0.0941,-0.0717,-0.0756,0.0823,0.0499,-0.1726,0.0110,0.
0471,-0.0885,0.5659,-0.2853,
0.0000,0.0000,10.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.000
0,0.0000,0.0000,0.0000,
0.4518,-0.0941,0.0000,0.4628,-0.0946,-0.0832,0.0269,-0.0433,0.1534,0.1658,-0
.1734,-0.0357,0.1541,0.0590,
-0.2225,-0.0717,0.0000,-0.0946,0.7507,-0.2025,0.1444,0.0769,0.2235,-0.2262,-
0.0785,0.2219,-0.8769,0.1178,
0.3445,-0.0756,0.0000,-0.0832,-0.2025,0.8657,-0.2060,-0.1753,-0.0705,0.3152,
-0.0420,-0.4371,0.6458,0.0251,
0.3154,0.0823,0.0000,0.0269,0.1444,-0.2060,0.9550,0.1393,0.1606,-0.2370,0.22
99,0.0200,0.2180,0.3415,
1.0511,0.0499,0.0000,-0.0433,0.0769,-0.1753,0.1393,1.1944,-0.2356,0.0413,0.0
313,-0.0847,-0.6080,-0.2639,
-0.7054,-0.1726,0.0000,0.1534,0.2235,-0.0705,0.1606,-0.2356,0.4790,0.0977,-0
.1630,0.1770,-0.5432,0.1281,
0.5307,0.0110,0.0000,0.1658,-0.2262,0.3152,-0.2370,0.0413,0.0977,0.9443,-0.1
274,-0.2130,0.5251,0.0430,
-0.7417,0.0471,0.0000,-0.1734,-0.0785,-0.0420,0.2299,0.0313,-0.1630,-0.1274,
0.9266,0.2314,0.2562,0.2392,
-0.8727,-0.0885,0.0000,-0.0357,0.2219,-0.4371,0.0200,-0.0847,0.1770,-0.2130,
0.2314,8.7859,-2.8996,0.1517,
2.1101,0.5659,0.0000,0.1541,-0.8769,0.6458,0.2180,-0.6080,-0.5432,0.5251,0.2
562,-2.8996,11.1410,0.4193,
0.0029,-0.2853,0.0000,0.0590,0.1178,0.0251,0.3415,-0.2639,0.1281,0.0430,0.23
92,0.1517,0.4193,0.7681
),
.Dim=c(14,14,3)))
-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list
|