R/dgp.R

Defines functions dgp

Documented in dgp

dgp <- function(n, sd = 1) {
   x1 <- seq(from = 0, to = 2 * pi, length = n)
   x2 <- runif(n = n)
   y <- rnorm(n = n, mean = sin(x1) + x2, sd = sd)
   return(data.frame(y, x1, x2))
}

Try the hgam package in your browser

Any scripts or data that you put into this service are public.

hgam documentation built on May 2, 2019, 5 p.m.