data(binge)
# Select two treated and three controls from binge
d<-binge[is.element(binge$SEQN,c(109315,109365,109266,109273,109290)),]
z<-1*(d$AlcGroup=="B")
names(z)<-d$SEQN
attach(d)
x<-data.frame(age,female)
detach(d)
rownames(x)<-d$SEQN
Ldist<-startcost(z)
Ldist<-addcaliper(Ldist,z,x$age,caliper=10,penalty=5)
Rdist<-startcost(z)
Rdist<-addNearExact(Rdist,z,x$female)
makenetwork(Ldist,Rdist)
Run the code above in your browser using DataLab