## find NPMLE of beta1 and beta2 in the simple YP model.
data(GastricCancer)
optim(par=c(1.5,-1.5), fn= myffitYP41,
myY=GastricCancer[1,],
myd=GastricCancer[2,],
myZ=GastricCancer[4,])
Run the code above in your browser using DataLab