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         x1
#> 1  1.0169690 3.092265 0.9900000  100 yes high 1.9653517  1.0000000 0.16630246
#> 2 -0.1229567 1.952339 0.4560680   46  no  low 1.1407196 -0.2363394 0.53903533
#> 3 -0.2380406 1.837255 0.4021636   40  no none 1.7760826 -0.2276778 0.09199109
#> 4  0.2999583 2.375254 0.6541580   66 yes high 0.0000000  0.3903429 0.42139066
#> 5 -0.4510741 1.624222 0.3023804   30  no none 0.0000000 -0.3925761 0.91944974
#> 6 -0.4631957 1.612100 0.2967028   29  no none 0.6829801 -0.3386446 0.41674452
#>          x2        x3  fac id        lon        lat         err
#> 1 0.1114923 0.9311871 high  1 0.86363636 0.36363636  0.01696899
#> 2 0.1690732 0.7248583  low  2 0.09090909 0.54545455  0.11338276
#> 3 0.5384616 0.3959943  low  3 0.31818182 0.77272727 -0.01036283
#> 4 0.5836437 0.9025054 high  4 0.13636364 0.09090909 -0.09038457
#> 5 0.7918226 0.9482536  low  5 0.13636364 0.59090909 -0.05849799
#> 6 0.5891254 0.5708711 high  6 0.90909091 0.95454545 -0.12455111

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