Compute the MLE (and its SE) of the dose achieving a specified target improvement from placebo.
The MLE (se) of the dose required to achieve a targetted improvement from placebo. The fit can be from a 3- or 4- parameter Emax model or output from function emaxalt, or an object of class emaxsimobj. The Emax model is on the logit scale for binary data.
targetD (fit, target, modType=4, binary=FALSE)
fit |
Output of |
target |
Targetted change from placebo (positive or negative). |
modType |
Value is 3 or 4 for the 3 or 4-parameter Emax model
output from nls with parameters in the
order (ed50,emax,e0) or (ed50,lambda,emax,e0).
|
binary |
When |
Returns a vector with two elements:
targetDose |
The MLE of the dose achieving the target. |
seTD |
SE for target.dose |
Asymptotic SE computed using the delta method
Neal Thomas
## Not run: ## emaxsim changes the random number seed doselev<-c(0,5,25,50,100,250) n<-c(78,81,81,81,77,80) dose<-rep(doselev,n) ### population parameters for simulation e0<-2.465375 ed50<-67.481113 dtarget<-100 diftarget<-9.032497 emax<-solveEmax(diftarget,dtarget,log(ed50),1,e0) sdy<-7.967897 pop<-c(led50=log(ed50),emax=emax,e0=e0) meanresp<-emaxfun(dose,pop) y<-rnorm(sum(n),meanresp,sdy) nls.fit<-nls(y ~ e0 + (emax * dose)/(dose + exp(led50)), start = pop, control = nls.control( maxiter = 100),trace=TRUE,na.action=na.omit) targetD(nls.fit,10,modType=3) ### ### apply targetD to an emaxsim object ### nsim<-50 sdy<-25 gen.parm<-FixedMean(n,doselev,emaxfun(doselev,pop),sdy) D4 <- emaxsim(nsim,gen.parm,modType=4) summary(D4,testalph=0.05) out<-NULL for(i in 1:nsim){ out<-rbind(out,targetD(D4[i],target=4)) } ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.