rb.Rd
This smooth constructor implements random bits model terms. Note that this is experimental.
## Linear smooth constructor.
rb(..., k = 50)
## For mgcv.
# S3 method for 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.42sec
#> Starting the sampler...
#>
#> | | 0% 10.23sec
#> |* | 5% 9.78sec 0.51sec
#> |** | 10% 9.24sec 1.03sec
#> |*** | 15% 9.04sec 1.59sec
#> |**** | 20% 8.46sec 2.12sec
#> |***** | 25% 7.97sec 2.66sec
#> |****** | 30% 7.46sec 3.20sec
#> |******* | 35% 6.93sec 3.73sec
#> |******** | 40% 6.39sec 4.26sec
#> |********* | 45% 5.87sec 4.80sec
#> |********** | 50% 5.32sec 5.32sec
#> |*********** | 55% 4.79sec 5.85sec
#> |************ | 60% 4.26sec 6.39sec
#> |************* | 65% 3.73sec 6.93sec
#> |************** | 70% 3.20sec 7.46sec
#> |*************** | 75% 2.66sec 7.99sec
#> |**************** | 80% 2.13sec 8.53sec
#> |***************** | 85% 1.60sec 9.07sec
#> |****************** | 90% 1.07sec 9.61sec
#> |******************* | 95% 0.53sec 10.14sec
#> |********************| 100% 0.00sec 10.66sec
plot(b)