Dear list members,
One problem solved thanks again to Miike Thompson. As you'll
see below, Mike suggested that I insert commas between the variables in
the inits file and guess what (IT WORKS! YIPPEE!!!!). As for monitoring
every nth draw, that doesn't appear to be implemented in WinBUGS yet
although there seems to be a very good reason for doing so according to
Kate Cowles:
Brian-
If your sampler has high autocorrelations, then just saving the last
500-1000 iterations is not a good solution because they may not cover
the whole parameter space. I'm a BUGS, rather than a WinBUGS, user so
far, so I don't know how to save only every nth iter in WinBUGS;
however, that is definitely a much better option than using a small
number of consecutive iterations, even after a very long burn-in.
Kate Cowles
U of Iowa
My other problem with the categorical variables summing to 1 is still
outstanding. Mike tried to compile my model with my data and failed
(but was successful on a smaller dataset). I think this is a question
for THE BUGS TEAM!
Overall, the main problem I am having using WinBUGS is that it is very
resource intensive in terms of memory and demands on the operating
system. I'm not a software engineer but I don't think the program is
making enough calls to the operating system for effective multi-tasking
(WinBUGS locks up my machine while updating, compiling, etc.. to the
point where I can minimize the windows to do something else).
I would like to comment that, regardless of the problems I am
encountering, I am very impressed with the WinBUGS interface and all the
readily available diagnostics! My compliments to THE BUGS TEAM for
putting this software together and making it available to the public.
Regards, Brian
________________________________
Brian P. Griner, Ph.D.
Manager, Telemarketing Modeling
ORC International
PO Box 183
Princeton, NJ 08542
Phone: 908.281.3566
Fax: 908.281.5103
Email: [log in to unmask]
________________________________
-----Original Message-----
From: Michael Thompson [mailto:[log in to unmask]]
<mailto:[mailto:[log in to unmask]]>
Sent: Wednesday, November 18, 1998 8:28 PM
To: Brian Griner
Subject: Re: Problem with saving state of the sampler and using
as inits
<<Brian.odc>> Dear Brian,
Thank you for the information on the inverse(.) function.
I would have never guessed the correct syntax.
I looked at your latest model and I can't figure out the problem. I've
attached a version of what I sent you that works with the small data
lists I included, but it doesn't compile with your large data. I don't
know what's wrong. It may be a bug in WinBUGS or it may be model
misspecification or it may be something peculiar to the values specified
in your data. Beats me.
With your init problem and variable 'd', have you tried inserting commas
between the structures for each variable and the name of the succeeding
variable? I haven't checked that, but it might work.
Your offer to provide me with a SAS model is appreciated, but I'll have
to pass. Thanks anyways.
Regards, -Mike -----Original Message-----
From: Brian Griner <[log in to unmask]
<mailto:[log in to unmask]> >
To: 'BUGS Discussion List' <[log in to unmask]
<mailto:[log in to unmask]> >
Date: Thursday, November 19, 1998 6:45 AM
Subject: Problem with saving state of the sampler and using as
inits
>Dear list members,
>
> I have encountered another problem. I burned in my model for
>10000 iterations and saved the state of the sampler. I then
saved the
>file to be used later as init. When I tried to use that file
as initial
>values I got an error on the d variable saying that it was
undefined???
>
> I am posting the code and parts of the inits file in hope that
>someone can help me figure out what the problem is.
>
> Thanks, Brian
>________________________________
>Brian P. Griner, Ph.D.
>Manager, Telemarketing Modeling
>ORC International
>PO Box 183
>Princeton, NJ 08542
>Phone: 908.281.3566
>Fax: 908.281.5103
>Email: [log in to unmask]
<mailto:[log in to unmask]>
>________________________________
>
>
># Prime Option Conjoint Analysis for Tier 2 Risk Group
>
># Random Coefficients GLM
>
> {
>
> for(p in 1:11629) {
>
> RATE[p] ~ dnorm(mu[p],tau);
>
># normal model with identity link
>
> mu[p] <- beta[SUBJECT[p],1] +
>inprod(beta[SUBJECT[p],2:14],X[p,]) }
>
># Random Coefficients Distributed Multivariate Normal
>
> for(i in 1:401) { beta[i,1:14] ~ dmnorm(mu.beta[],d[,]) }
>
># priors
>
># alpha~dnorm(0,0.1);
>tau~dgamma(2,0.1);
>sigma2.error<-1/tau;
>
># random coefficients
> for(k in 1:14) { mu.beta[k]~dnorm(0,.01) }
>
># precision of random coefficients
> d[1:14,1:14]~dwish(R[1:14,1:14],14);
>
> for (i in 1:14) { for (j in 1:14) { sigma2.beta[i,j] <-
>inverse(d[1:14,1:14],i,j) } }
>
> for(i in 1:14) { for(j in 1:14) { R[i,j] <- equals(i,j) } }
>
>}
>
>INITS
>
>list(
>beta = structure(.Data = c(
>3.282412588667338,0.7653116614984412,-0.6906804253640223,-1.34153435121
0
>83,-2.112894924887341,
>0.8947587460790352,0.9058212047781707,0.4360582023989157,0.127405600245
2
>24,0.012869414820995,
>
>...
>
>
>-0.1407106276842542,0.2349147166280131,0.3298823778435878,-0.0586900622
4
>45765,-0.4458489635741271,
>1.884119891594754,-0.004886750337744855,-0.9303979087012357,-1.53317260
1
>025971,-2.030882364102262,
>-0.2794327945319873,0.5958414062346165,0.2038176111625159,0.31612398387
9
>9775,-0.1304391681751179,
>0.2957778422655853,0.6222548743066683,0.09803902887743932,-0.0340345355
8
>856817),
>.Dim = c(401,14))
>d = structure(.Data = c( THE PROBLEM IS HERE!!! IT SAYS
"UNDEFINED
>VARIABLE"???
>4.22764833208275,1.240162001239989,-3.153540656687308,1.27924632537375,
3
>.546791846759434,
>3.313650026072872,0.5024764674462132,-2.00051750617372,1.13623621926096
,
>-0.03702284031076551,
>1.149914801699361,1.464918876459561,1.26849351989115,2.295094952160221,
1
>.240162001239989,
>11.36360744280755,-12.88687417131261,-1.547403952582656,6.7691534578426
8
>1,0.5131004519136159,
>
>...
>
>2.19881004099468,-2.429780251699416,3.002398802178393,-0.21933521995352
4
>1,-6.57135526116418,
>7.321966874461973),
>.Dim = c(14,14))
>mu.beta = c(
>1.857866959860349,0.3281089176872713,-0.0148070665621257,-0.26232144917
0
>7054,-0.4863865667861188,
>-0.0850994402168696,0.3618201923427917,0.1422602237089615,-0.0288159974
9
>008245,-0.0274879895572637,
>0.2839049469229803,0.297947081691159,-0.07421523878963014,-0.4382493687
5
>07391)
>tau = 2.043489224369806)
>
>
|