View source: R/model-to-file.R
model_to_file | R Documentation |
model_to_file
allows you to save any of the preloaded hierarchical
Bayesian models to a text file.
model_to_file(model = NULL, filename = NULL, heavy_tailed = FALSE)
model |
Model to be saved. Options are "slope", "firstdiff", "gam", "gamye" |
filename |
File name to create on disk. |
heavy_tailed |
Logical indicating whether the extra-Poisson error distribution should be modeled as a t-distribution, with heavier tails than the standard normal distribution. Default is currently FALSE, but recent results suggest users should strongly consider setting this to TRUE, even though it requires much longer convergence times |
None
# Save the Slope model to a file called "slope.txt" in temp directory
model_to_file(model = "slope",
filename = file.path(tempdir(), "slope.txt"))
# Save the First Difference model to a file called "fd.txt" in temp directory
model_to_file(model = "firstdiff",
filename = file.path(tempdir(), "fd.txt"))
# Save the GAM model to a file called "gam.txt" in temp directory
model_to_file(model = "gam",
filename = file.path(tempdir(), "gam.txt"))
# Save the GAM year effects model to a file called "gamye.txt" in temp directory
model_to_file(model = "gamye",
filename = file.path(tempdir(), "gamye.txt"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.