stanmodel object represents the model compiled from C++ code.
sampling method defined in this class may be used to
draw samples from the model and
optimizing method is for
obtaining a point estimate by maximizing the log-posterior.
stanmodel are usually created by calling
stan_model or function
The model name, an object of type
The Stan model specification, an object of type
Object of type
that includes the C++ code for the model.
A function to return a RCpp module. This function will be
called in function
optimzing with one
argument (the instance of
Object of S4 class
cxxdso. The container for the dynamic
shared objects compiled from the C++ code of the model, returned from function
cxxfunction in package inline.
signature(object = "stanmodel"): print the Stan model specification.
signature(object = "stanmodel"): use the variational Bayes algorithms.
signature(object = "stanmodel"): draw samples for
the model (see
signature(object = "stanmodel"): obtain a point
estimate by maximizing the posterior (see
signature(object = "stanmodel"): returns the C++ code for the model
as a character string. This is part of the C++ code that is compiled to the dynamic
shared object for the model.
signature(object = "stanmodel"): returns the Stan code for
the model as a character string
signature(object = "stanmodel"): return the
used for compiling the model. The returned string is like
CXXFLAGS = -O3.
Objects of class
stanmodel can be saved for use across
R sessions only if
save_dso = TRUE is set during calling
functions that create
stanmodel objects (e.g.,
save_dso = TRUE, the model cannot be loaded on
a platform (operating system, 32 bits or 64 bits, etc.) that differs from
the one on which it was compiled.
showClass("stanmodel")#> Class "stanmodel" [package "rstan"] #> #> Slots: #> #> Name: model_name model_code model_cpp mk_cppmodule dso #> Class: character character list function cxxdso