devtools::load_all()
corr <- bootstrap.cf(samplecf)
We want the same plot output with both plot mechanism.
matrixfit
old_fit <- matrixfit(corr, 10, 20) plot(old_fit, do.qqplot = FALSE) plot(old_fit, plot.raw = FALSE, do.qqplot = FALSE, ylim = c(0.99, 1.01), main = 'Old Residual Plot')
new_matrixfit
new_fit <- new_matrixfit(corr, 10, 20) plot(new_fit, log = 'y', supports = 431) residual_plot(new_fit, ylim = c(0.99, 1.01), main = 'New Residual Plot (division)') residual_plot(new_fit, ylim = c(-1, 1), main = 'New Residual Plot (subtraction)', operation = `-`)
npar <- length(new_fit$par.guess) prediction_val <- do.call(new_fit$fn, c(list(par = new_fit$t0[1:npar], x = new_fit$x, boot.r = 0), new_fit$tofn))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.