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.41912697 1.667752 0.3172220 31 no low 0.0000000 -0.454911527 #> 2 -0.64290601 1.443973 0.2142649 21 no none 0.0000000 -0.567387027 #> 3 0.01258302 2.099462 0.5158447 52 yes medium 0.9366895 0.005914044 #> 4 -0.56909443 1.517785 0.2482244 24 no none 0.0000000 -0.594829993 #> 5 0.13447127 2.221351 0.5719235 57 yes high 1.3783995 0.143567571 #> 6 -0.37687959 1.710000 0.3366593 33 no low 0.1581743 -0.303828789 #> x1 x2 x3 fac id lon lat err #> 1 0.28145490 0.4715616 0.4339816 medium 1 0.5454545 0.7727273 0.035784558 #> 2 0.53045091 0.6130908 0.3954608 high 2 0.8636364 0.9090909 -0.075518986 #> 3 0.43285543 0.9819471 0.5478450 medium 3 0.8181818 0.4545455 0.006668971 #> 4 0.91717922 0.3550956 0.7618364 medium 4 1.0000000 0.5454545 0.025735565 #> 5 0.02747746 0.9069297 0.2540708 medium 5 0.0000000 0.1363636 -0.009096306 #> 6 0.82490547 0.9480849 0.5392890 high 6 0.4090909 0.1818182 -0.073050803
# NOT RUN { b <- bamlss(num ~ s(x1) + s(x2) + s(x3) + te(lon,lat), data = d) plot(b) # }