context("ridgereg")
data("iris")
library (MASS)
test_that("Coefficients of lm.ridge and ridgereg are equal", {
ridgereg_ex <- ridgereg(formula = Petal.Length ~ Sepal.Width + Sepal.Length, data = iris, lambda = 0)
linmod_ridge <- lm.ridge(formula = Petal.Length ~ Sepal.Width + Sepal.Length, data = iris)
expect_equal(round(as.vector(linmod_ridge$coef),2),round(as.vector(ridgereg_ex$coef()),2))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.