require(DTR)
#-------Example function usage-----------
n<-500
L<-1.5
max.c<-2.5
pi.r<-0.5
pi.z<-0.5
lambda<-1.33
alpha<-6.67
beta1<-0.29
beta2<--0.67
# Generate data from SRD
set.seed(123) # Set a seed to reproduce the same data every time running the following command
data<-sim.LDT.data(n,L,max.c,pi.r,pi.z,lambda,alpha,beta1,beta2)
# Calculate LTD estimates
LDT.estimator(data,t=c(0.5,1),L=1.5)
Run the code above in your browser using DataLab