## Not run:
# ## a correctly specified model
# ###############################
#
# set.seed(123456)
# x <- runif(20000)
# y <- as.numeric( runif(20000) < pnorm(2*x - 1) )
# mod <- glm( y ~ x, family=binomial(link="probit"))
# pred <- predict(mod, type="response")
#
# heatmap.fit(y, pred, reps=1000)
#
# ## out-of-sample prediction w/o bootstrap p-values
#
# set.seed(654321)
# x <- runif(1000)
# y <- as.numeric( runif(1000) < pnorm(2*x - 1) )
# pred <- predict(mod, type="response", newdata=data.frame(x))
#
# heatmap.fit(y, pred, calc.boot=FALSE)
#
#
#
# ## a misspecified model
# ########################
#
# set.seed(13579)
# x <- runif(20000)
# y <- as.numeric( runif(20000) < pnorm(sin(10*x)) )
# mod <- glm( y ~ x, family=binomial(link="probit"))
# pred <- predict(mod, type="response")
# heatmap.fit(y, pred, reps=1000)
#
# ## Comparison with and without data compression
#
# system.time(heatmap.fit(y, pred, reps=100))
# system.time(heatmap.fit(y, pred, reps=100, compress.obs=FALSE))
# ## End(Not run)
Run the code above in your browser using DataLab