Skip to content
Prev 5772 / 20628 Next

Can we fit this model in nlme or lme4? Monday, March 28, 2011 8:10 PM

Ben and others -

Thank you for your reply!!
Currently, I am using the following WinBUGS code to fit the model.
The estimation is good, but it took too much time to do some simulation.
So I was wondering if there is a way to do this fast since I only need the MLE estimate.



	     model
          {
           for (i in 1:nSUB) {
		           s[i] ~ dnorm(0, tau.precision);
               	}

          	for(j in 1 : nOBS) {
            		p[j] <- (E0 + Emax*Dose[j]/(ED50+Dose[j])+s[sub_seq[j]]) * (1-exp(k*X[j])) / (1-exp(k*d));
              	Y[j] ~ dnorm(p[j], sigma.precisionind[j]);
                sigma.precisionind[j] <- sigma.precision / pow((1-exp(k*X[j])) / (1-exp(k*d)), 2);}

           E0 ~ dnorm(0,0.0000001);
           Emax ~ dnorm(40,0.00000001);
           k~ dunif(-10,-0.001);
           ED50 ~ dunif(0.0001,10000);
           sigma.precision ~ dgamma(0.000001,0.000001) ;
           tau.precision ~ dgamma(0.000001,0.000001) ;
           Sigma<-sqrt(1/sigma.precision);
           Tau<-sqrt(1/tau.precision);
         }
     

Best,
Haoda
--- On Thu, 3/31/11, Ben Bolker <bbolker at gmail.com> wrote: