GAMart.Rd
This function creates artificial GAM-type data.frame
s.
The function is mainly used for testing purposes.
GAMart(n = 500, sd = 0.1, seed = FALSE,
ti = c("none", "vcm", "main", "both"))
The number of observations.
Standard deviation of the normal errors.
Sets the seed
to 111
.
For tensor product interaction term, the type of interaction.
d <- GAMart()
head(d)
#> num pnum bnum cnum bin cat cens eta x1
#> 1 -0.4497811 1.691436 0.3033638 30 no none 0.000000 -0.37799392 0.99224239
#> 2 -0.3343110 1.806906 0.3523558 35 no none 0.000000 -0.47455213 0.22782415
#> 3 0.5756694 2.716886 0.7384443 74 yes high 0.000000 0.56631234 0.13231028
#> 4 -0.2666320 1.874585 0.3810708 38 no low 1.286787 -0.26486410 0.62844445
#> 5 -0.0572494 2.083967 0.4699081 47 yes medium 0.000000 0.06743703 0.53186759
#> 6 0.5981314 2.739348 0.7479745 75 yes high 0.000000 0.50664908 0.01437493
#> x2 x3 fac id lon lat err
#> 1 0.9590275 0.71230048 medium 1 0.09090909 0.72727273 -0.071787217
#> 2 0.6543157 0.59238197 low 2 0.54545455 0.09090909 0.140241109
#> 3 0.9033687 0.00958522 high 3 0.18181818 0.18181818 0.009357073
#> 4 0.9828262 0.63567766 high 4 0.72727273 0.86363636 -0.001767906
#> 5 0.7719231 0.75022459 high 5 0.63636364 0.50000000 -0.124686426
#> 6 0.7259872 0.85406946 medium 6 0.81818182 0.50000000 0.091482333
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