Dear BUGS-List,
I have data which i fitted by a nonlinear model in R and equivalently in
BUGS. Here is the program i used (which should be alright):
model indiv1;
const
nt = 13, # number of time points
n = 34; # number of subjects
var
Y[n,nt], # concentration of a drug in plasma
mu[n,nt],
t[nt], #day 1,...,13
lt09[n], #log(day) at which the drug in plasma is at steady state
tau[n],
sigma[n],
C0[n], # asymptotic steady state (concentration of drug)
t09[n], #day) at which the drug in plasma is at steady state
g[n,nt];
data Y in "pardrug.dat", t in "days.dat";
inits in "bp16357.in";
{
for (i in 1:n)
{
for (j in 1:nt)
{
Y[i,j] ~ dnorm(mu[i,j],tau[i]);
mu[i,j] <- C0[i]*(1-exp(log(0.1)*t[j]/exp(lt09[i]))); #model
g[i,j] <- mu[i,j]/C0[i];
}
tau[i] ~ dgamma(0.01,0.01); #priors
sigma[i] <- 1/sqrt(tau[i]);
C0[i] ~ dnorm(30,0.001) ;
lt09[i] ~ dnorm(1,0.01) I(-1,5);
t09[i] <- exp(lt09[i]);
}
}
Equivalently i fitted this model in R (for anyone who knows R, just for
comparison):
nlsList(concentr~a*(1-exp(day*(log(0.1,base=exp(1))/exp(logt09))))|subject,
data=bp16357.group,start=list(a=20,logt09=1))
So for each subject, the mod
Ideally, the results should be similar in R and BUGS. Well, they are not! I
tried to change the priors of to make the intervall larger or smaller but
it only made it worse. I tried to do more iterations (50'000)but this also
didnt change the fact that values are different. Consequentially im
struggling which model is right and trying to find out if this maybe is a
problem of the metropolis algorithm or of my model specification but at the
moment i cant figure out what it is. I would really appreciate any help
about this topic. Thanks in advance!
Dassy
-------------------------------------------------------------------
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
|