## Not run:
# data(legfig) # Clark and Golder 2006 replication data
# set.seed(1231124)
#
# # limit to established democracies from the 1990s
# dat<-subset(legfig, subset=(nineties==1 & old==1))
#
# # create bootstrap samples of marginal effects of eneg and logmag on enep1
# # uses the bootFun utility included in this package
# library(boot)
# boot.t.dist <- boot(data = dat, statistic = bootFun, R = 1000,
# form=enep1 ~ eneg * logmag + uppertier_eneg + uppertier + proximity1 +
# proximity1_enpres + enpres, fam="gaussian", x.name="eneg",
# z.name="logmag")$t
# boot.t.x.dist<-boot.t.dist[,1:10]
#
#
# # calculate critical t-statistic that sets familywise error rate to 10%
# # for statistical significance of marginal effect of of eneg at any value of logmag
# findMultiLims(boot.t.x.dist, type="any", err=0.1)$minimum # answer: 2.593086
#
# # calculate critical t-statistic that sets FWER to 10% for ME of eneg = 0
# # when logmag is small and ME of eneg > 0 when logmag is large
# boot.t.x.dist.lo<-boot.t.dist[,1:5]
# boot.t.x.dist.hi<-boot.t.dist[,6:10]
# findMultiLims(boot.t.x.dist.lo, boot.t.x.dist.hi, type="all", p1=0,
# p2=1, err=0.1)$minimum # answer: 1.008688
# ## End(Not run)
Run the code above in your browser using DataLab