library(tibble) library(dplyr) library(testthat) library(gt) devtools::load_all()
gridpts
approximate variance of standard normal (i.e., 1)
x1 <- gridpts_(mu = 0, a = -20, b = 20, r = 18) x2 <- gridpts(mu = 0, a = -20, b = 20, r = 18) x3a <- gsDesign::normalGrid(bounds = c(-10, 10), mu = 0, sigma = 1, r = 18) x3b <- gsDesign::normalGrid(bounds = c(-20, 20), mu = 0, sigma = 1, r = 18) x3c <- gsDesign::normalGrid(bounds = c(-80, 80), mu = 0, sigma = 1, r = 18)
tibble(Rcpp = length(x1$z), R = length(x2$z), `C with (a, b) = (-10, 10)` = length(x3a$z), `C with (a, b) = (-20, 20)` = length(x3b$z), `C with (a, b) = (-80, 80)` = length(x3c$z)) %>% gt() %>% tab_header("Number of grid points")
tibble(diff_z = sum(abs(x1$z - x2$z)), diff_w = sum(abs(x1$w - x2$w))) %>% gt() %>% tab_header(title = "Difference between Rcpp and R", subtitle = "in gsdmvn")
tibble(diff_z = sum(abs(x1$z - x3a$z)), diff_w = sum(abs(x1$w - x3a$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign (C) and gsdmvn (Rcpp)", subtitle = "under (a, b) = (-10, 10)")
tibble(diff_z = sum(abs(x1$z - x3b$z)), diff_w = sum(abs(x1$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-20, 20)")
tibble(diff_z = sum(abs(x1$z - x3b$z)), diff_w = sum(abs(x1$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-80, 80)")
x1 <- gridpts_(mu = 0, a = qnorm(0.95), b = Inf, r = 18) x2 <- gridpts(mu = 0, a = qnorm(0.95), b = Inf, r = 18) x3a <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 10), mu = 0, sigma = 1, r = 18) x3b <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 20), mu = 0, sigma = 1, r = 18) x3c <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 80), mu = 0, sigma = 1, r = 18)
tibble(Rcpp = length(x1$z), R = length(x2$z), `C with (a, b) = (-10, 10)` = length(x3a$z), `C with (a, b) = (-20, 20)` = length(x3b$z), `C with (a, b) = (-80, 80)` = length(x3c$z)) %>% gt() %>% tab_header("Number of grid points")
tibble(diff_z = sum(abs(x1$z - x2$z)), diff_w = sum(abs(x1$w - x2$w))) %>% gt() %>% tab_header(title = "Difference between Rcpp and R", subtitle = "in gsdmvn")
tibble(diff_z = sum(abs(x2$z - x3a$z)), diff_w = sum(abs(x2$w - x3a$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign (C) and gsdmvn (Rcpp)", subtitle = "under (a, b) = (-10, 10)")
tibble(diff_z = sum(abs(x2$z - x3b$z)), diff_w = sum(abs(x2$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-20, 20)")
tibble(diff_z = sum(abs(x2$z - x3b$z)), diff_w = sum(abs(x2$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-80, 80)")
x1 <- gridpts_(mu = 0.5, a = qnorm(0.95), b = Inf, r = 18) x2 <- gridpts(mu = 0.5, a = qnorm(0.95), b = Inf, r = 18) x3a <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 10), mu = 0.5, sigma = 1, r = 18) x3b <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 20), mu = 0.5, sigma = 1, r = 18) x3c <- gsDesign::normalGrid(bounds = c(qnorm(0.95), 80), mu = 0.5, sigma = 1, r = 18)
tibble(Rcpp = length(x1$z), R = length(x2$z), `C with (a, b) = (-10, 10)` = length(x3a$z), `C with (a, b) = (-20, 20)` = length(x3b$z), `C with (a, b) = (-80, 80)` = length(x3c$z)) %>% gt() %>% tab_header("Number of grid points")
tibble(diff_z = sum(abs(x1$z - x2$z)), diff_w = sum(abs(x1$w - x2$w))) %>% gt() %>% tab_header(title = "Difference between Rcpp and R", subtitle = "in gsdmvn")
tibble(diff_z = sum(abs(x1$z - x3a$z)), diff_w = sum(abs(x1$w - x3a$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign (C) and gsdmvn (Rcpp)", subtitle = "under (a, b) = (-10, 10)")
tibble(diff_z = sum(abs(x1$z - x3b$z)), diff_w = sum(abs(x1$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-20, 20)")
tibble(diff_z = sum(abs(x1$z - x3b$z)), diff_w = sum(abs(x1$w - x3b$gridwgts))) %>% gt() %>% tab_header(title = "Difference between gsDesign and gsdmvn", subtitle = "under (a, b) = (-80, 80)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.