rb.RdThis smooth constructor implements random bits model terms. Note that this is experimental.
## Linear smooth constructor.
rb(..., k = 50)
## For mgcv.
# S3 method for class 'randombits.smooth.spec'
smooth.construct(object, data, knots, ...)For function rb() a formula of the type ~x1+x2+x3 that specifies
the covariates that should be modeled.
Integer, number of radnom bit columns in the design matrix.
See smooth.construct.
Function rb(), similar to function s a simple smooth specification
object.
if (FALSE) ## Simulate data.
set.seed(123)
d <- GAMart()
## Estimate model.
f <- num ~ rb(x1) + rb(x2) + rb(x3) + rb(~lon+lat)
b <- bamlss(f, data = d)
#> AICc -21.2792 logPost 634.6085 logLik 50.3258 edf 36.694 eps 0.9571 iteration 1
#> AICc -130.004 logPost 696.6471 logLik 115.4859 edf 45.762 eps 0.3027 iteration 2
#> AICc -152.558 logPost 724.1035 logLik 140.2322 edf 56.587 eps 0.2419 iteration 3
#> AICc -155.353 logPost 727.0658 logLik 148.2131 edf 61.692 eps 0.0668 iteration 4
#> AICc -155.847 logPost 727.5953 logLik 150.2628 edf 63.069 eps 0.0155 iteration 5
#> AICc -155.992 logPost 727.6831 logLik 150.5223 edf 63.212 eps 0.0021 iteration 6
#> AICc -156.018 logPost 727.6915 logLik 150.5551 edf 63.227 eps 0.0003 iteration 7
#> AICc -156.021 logPost 727.6922 logLik 150.5595 edf 63.229 eps 0.0000 iteration 8
#> AICc -156.021 logPost 727.6922 logLik 150.5595 edf 63.229 eps 0.0000 iteration 8
#> elapsed time: 0.67sec
#> Starting the sampler...
#>
#> | | 0% 12.26sec
#> |* | 5% 12.24sec 0.64sec
#> |** | 10% 11.68sec 1.30sec
#> |*** | 15% 11.06sec 1.95sec
#> |**** | 20% 10.66sec 2.67sec
#> |***** | 25% 10.18sec 3.39sec
#> |****** | 30% 9.64sec 4.13sec
#> |******* | 35% 8.96sec 4.83sec
#> |******** | 40% 8.26sec 5.50sec
#> |********* | 45% 7.56sec 6.18sec
#> |********** | 50% 6.86sec 6.86sec
#> |*********** | 55% 6.19sec 7.56sec
#> |************ | 60% 5.49sec 8.24sec
#> |************* | 65% 4.80sec 8.92sec
#> |************** | 70% 4.12sec 9.60sec
#> |*************** | 75% 3.43sec 10.29sec
#> |**************** | 80% 2.76sec 11.02sec
#> |***************** | 85% 2.07sec 11.71sec
#> |****************** | 90% 1.38sec 12.39sec
#> |******************* | 95% 0.69sec 13.09sec
#> |********************| 100% 0.00sec 13.79sec
plot(b)
# \dontrun{}