This function creates artificial GAM-type data.frames. The function is mainly used for testing purposes.

GAMart(n = 500, sd = 0.1, seed = FALSE,
  ti = c("none", "vcm", "main", "both"))

Arguments

n

The number of observations.

sd

Standard deviation of the normal errors.

seed

Sets the seed to 111.

ti

For tensor product interaction term, the type of interaction.

Examples

d <- GAMart()
head(d)
#>          num     pnum       bnum cnum bin    cat      cens         eta
#> 1  0.2691830 2.292751 0.59023468   59 yes   high 0.0000000  0.16962324
#> 2 -0.6695896 1.353979 0.16887875   16  no   none 0.0000000 -0.67278753
#> 3  0.1413709 2.164939 0.53286788   53 yes medium 0.1775568 -0.02230024
#> 4 -0.9082513 1.115317 0.06175853    5  no   none 2.2057512 -0.66285701
#> 5 -0.6062427 1.417326 0.19731121   19  no   none 0.0000000 -0.36733516
#> 6  0.1127209 2.136289 0.52000869   52 yes medium 2.1584237  0.07573199
#>           x1         x2         x3 fac id        lon       lat          err
#> 1 0.25029205 0.21640237 0.56613961 low  1 0.09090909 0.0000000  0.099559708
#> 2 0.62691454 0.90274097 0.59225728 low  2 0.86363636 1.0000000  0.003197917
#> 3 0.85673263 0.03460927 0.05309795 low  3 0.18181818 0.7727273  0.163671112
#> 4 0.70585377 0.48214654 0.26732527 low  4 0.09090909 0.5909091 -0.245394304
#> 5 0.70593494 0.96198657 0.43475174 low  5 0.54545455 0.4545455 -0.238907494
#> 6 0.09709474 0.02929694 0.19868781 low  6 0.63636364 0.1818182  0.036988869

if (FALSE) b <- bamlss(num ~ s(x1) + s(x2) + s(x3) + te(lon,lat), data = d)
plot(b)
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'plot': object 'b' not found