A model for use in rsstap examples.
Calling example("example_model")
will run the model in the
Examples section, below, and the resulting sstapreg object will then be
available in the global environment. The chains
and iter
arguments are specified to make this example be small in size. In practice,
it is reccomended that they be left unspecified in order to use the default
values (4 and 2000 respectively) or increased if there are convergence
problems. The cores
argument is optional and on a multicore system,
the user may well want to set that equal to the number of chains being
executed.
example_benvo
for a description of the data.
example_model <- sstap_lm(BMI ~ sex + sap(FFR), benvo = rbenvo::example_benvo, # this next line is only to keep the example small in size! chains = 1, cores = 1, seed = 12345, iter = 500, refresh = 0)#> Warning: The largest R-hat is 1.07, indicating chains have not mixed. #> Running the chains for more iterations may help. See #> http://mc-stan.org/misc/warnings.html#r-hat#> Warning: Bulk Effective Samples Size (ESS) is too low, indicating posterior means and medians may be unreliable. #> Running the chains for more iterations may help. See #> http://mc-stan.org/misc/warnings.html#bulk-ess#> Warning: Tail Effective Samples Size (ESS) is too low, indicating posterior variances and tail quantiles may be unreliable. #> Running the chains for more iterations may help. See #> http://mc-stan.org/misc/warnings.html#tail-essexample_model#> #> family: gaussian [identity] #> formula: BMI ~ sex + sap(FFR) #> observations: 1000 #> fixed effects: 12 #> ------ #> Median MAD #> (Intercept) 25.9 0.1 #> sex -2.1 0.1 #> s(FFR).1 2.9 0.7 #> s(FFR).2 2.9 0.1 #> s(FFR).3 3.1 0.1 #> s(FFR).4 2.9 0.1 #> s(FFR).5 2.7 0.1 #> s(FFR).6 1.4 0.1 #> s(FFR).7 0.1 0.1 #> s(FFR).8 0.0 0.1 #> s(FFR).9 -0.1 0.1 #> s(FFR).10 0.7 0.8 #> #> Smoothing terms: #> Median MAD_SD #> smooth_precision[s(FFR)1] 4.0 1.7 #> smooth_precision[s(FFR)2] 0.1 0.0