# NOT RUN {
# To run these examples, you MUST have gurobi installed.
# gurobi is available for free to academic faculty
# Search for the gurobi web page, and click the menu for Academia
# Search for "gurobi and R" to find gurobi's local R package
# connecting gurobi and R. You must install both gurobi
# and its local R package to run informedsen.
#
# The examples are from Rosenbaum (2021)
#
# gurobi generates output before the output from informedsen
# appears. In a first use, you might skip to the output
# from informedsen, which begins with text labeled result.
#
data(HDL)
shdl<-senmscores(HDL$hdl,HDL$z,HDL$mset)
smmerc<-senmscores(HDL$mmercury,HDL$z,HDL$mset)
sc<-cbind(shdl,smmerc)
# A test within the confidence set
informedsen(3.5, sc, HDL$z, HDL$mset, alpha = 0.05)
# A test within the confidence set using
# the method of Berger and Boos (1994)
informedsen(3.4, sc, HDL$z, HDL$mset, alpha = c(0.04,0.01))
# An example in which the confidence set is empty
informedsen(1.25, sc, HDL$z, HDL$mset, alpha = .05)
# }
Run the code above in your browser using DataLab