knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
library(spheregr)
set.seed(1) opts <- create_linreg_opts(reps = 1000) print(system.time( sim_rand<- simulate(opts) )) save(sim_rand, file="sim_rand")
load("sim_rand")
# mise ise_stats <- sim_extract_ise_stats(sim_rand) mise_table_from_ise_stats(ise_stats, c("mean", "sd"))
# speed sim_extract_speed_mse(sim_rand)
set.seed(1) opts <- create_linreg_opts( reps = 1000, p = convert_a2e(c(2, 0)), v = matrix(c(0, 1, 0), nrow=1)) print(system.time( sim_line <- simulate(opts) )) save(sim_line, file="sim_line")
load("sim_line")
# median curves ise_stats <- sim_extract_ise_stats(sim_line) idx <- 11 sim <- sim_line[[idx]] idx_median <- ise_stats[[idx]]$idx_median for (meth in linreg_methods) sim_plot_run(sim_line[[idx]][[idx_median[[meth]] ]])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.