This function enables the API for the given bamlss model. Afterwards, you can use the functions from the bamlssAPI package with the model.

apify(model, propose = "iwlsC_gp")

Arguments

model

A bamlss::bamlss or bamlss::bamlss.frame object.

propose

A string containing the name of a bamlss propose function for model terms. Defaults to "iwlsC_gp". See bamlss::GMCMC().

Value

The API-enabled model.

Examples

library(bamlss)
#> Loading required package: coda
#> Loading required package: colorspace
#> Loading required package: mgcv
#> Loading required package: nlme
#> This is mgcv 1.8-31. For overview type 'help("mgcv-package")'.
#> #> Attaching package: ‘bamlss’
#> The following object is masked from ‘package:mgcv’: #> #> smooth.construct
#> The following object is masked from ‘package:bamlssAPI’: #> #> parameters
y <- rnorm(10) b <- bamlss(y ~ 1)
#> AICc 35.2644 logPost -30.4284 logLik -14.7750 edf 2.0000 eps 0.8993 iteration 1 #> AICc 35.2642 logPost -30.4283 logLik -14.7750 edf 2.0000 eps 0.0228 iteration 2 #> AICc 35.2642 logPost -30.4283 logLik -14.7750 edf 2.0000 eps 0.0000 iteration 3 #> AICc 35.2642 logPost -30.4283 logLik -14.7750 edf 2.0000 eps 0.0000 iteration 3 #> elapsed time: 0.01sec #> Starting the sampler... #> #> | | 0% 2.26sec #> |* | 5% 1.10sec 0.06sec #> |** | 10% 1.42sec 0.16sec #> |*** | 15% 2.06sec 0.36sec #> |**** | 20% 1.69sec 0.42sec #> |***** | 25% 1.45sec 0.48sec #> |****** | 30% 1.27sec 0.54sec #> |******* | 35% 1.13sec 0.61sec #> |******** | 40% 1.01sec 0.68sec #> |********* | 45% 0.90sec 0.74sec #> |********** | 50% 0.79sec 0.79sec #> |*********** | 55% 0.69sec 0.85sec #> |************ | 60% 0.60sec 0.90sec #> |************* | 65% 0.51sec 0.95sec #> |************** | 70% 0.43sec 1.01sec #> |*************** | 75% 0.35sec 1.06sec #> |**************** | 80% 0.28sec 1.11sec #> |***************** | 85% 0.21sec 1.16sec #> |****************** | 90% 0.14sec 1.22sec #> |******************* | 95% 0.07sec 1.27sec #> |********************| 100% 0.00sec 1.33sec
b <- apify(b)