monitor_mmc | R Documentation |
This function provides a way to merge the user specified controls for the optimization methods with their respective default controls.
monitor_mmc(object, alpha = NULL, monitor = TRUE)
object |
A data.frame |
alpha |
An atomic vector. If |
monitor |
A logical. If set to TRUE, then the p-values at every iteration and the cumulative maximum p-value are plotted on a graphical device. Default is FALSE. |
A list. Arguments to be used to control the behavior
of the algorithm chosen in method
.
# Create empty data frame to store the p-values at the different iterations
opt_trace <- as.data.frame(matrix(data = NA, 100, 3,
dimnames = list(NULL,c("ite","pval","max"))))
# Generate some random p-values
for (ite in 1:100){
pval <- runif(1,0,.6)
opt_trace[ite,] <- c(ite, pval, max(pval, opt_trace$pval, na.rm = TRUE))
}
# Plot p-values for every iterations
MaxMC:::monitor_mmc(opt_trace, alpha = 0.05, monitor = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.