search for: mpred

Displaying 1 result from an estimated 1 matches for "mpred".

Did you mean: pred
2011 Aug 17
2
An example of very slow computation
...1],sol) -sum(dnorm(dat[,2],mean=pred,sd=sigma, log=TRUE)) } getpred<-function(theta, t){ k<-exp(theta[1:3]) sigma<-exp(theta[4]) A<-rbind( c(-k[1], k[2]), c( k[1], -(k[2]+k[3])) ) x0<-c(0,100) sol<-function(tt)100-sum(expm(A*tt)%*%x0) pred<-sapply(t,sol) } Mpred <- function(theta) { # WARNING: assumes t global kvec<-exp(theta[1:3]) k1<-kvec[1] k2<-kvec[2] k3<-kvec[3] # MIN problem terbuthylazene disappearance z<-k1+k2+k3 y<-z*z-4*k1*k3 l1<-0.5*(-z+sqrt(y)) l2<-0.5*(-z-sqrt(y)) val<-100*(1-((k1+k2+l2)*exp(...