286 Exposure-Response Modeling: Methods and Practical Implementation
Stop=c(Stop,(i+1)*Rtl)
Go=c(Go,Vt-C+Rt1)
Vt=max(Vt-C+Rt(nrep-i),(i+1)*Rtl)
Vp=c(Vp,Vt)
Ind=c(Ind,1*(Vt-C+Rt1>(i+1)*Rtl))
Rv=c(Rv,Rtl)
}
return(cbind(Stop,Go,Vp,Rv))
}
outv=opstop(C=0.2,L=0.25)
out=outv[9:1,]
plot(1:9,out[,3],ylim=c(0,max(out)),ylab="Value",lty=1,
type="l",xlab="Period")
lines(1:9,out[,1],lty=2)
lines(1:9,out[,2],lty=3)
lines(1:9,out[,4],lty=4)
legend(7,2.8,lty=1:4,legend=c("Vt","Vgo","Vstop","Reward"))
The figure shows that before the 5th period, V
t
is the same as V
go
and after
that V
t
is the same as V
stop
. Therefore, the optimal stopping rule is to stop at
period 5. The curve of R
t
shows a slow increase in the reward of cumulative
information. The optimal stopping time is when