Description Usage Arguments Details Value Note See Also Examples
This function calls the dynamic library, parses the .gcn model file, generates a .model.R file,
and loads it into a gecon_model
class object.
1 | make_model(filename)
|
filename |
the path to the .gcn file containing model formulation. The |
Cf. gEcon users' guide, chapters ‘Model description language’ and ‘Derivation of First Order Conditions’.
An object of the gecon_model
class representing the model. Generic functions such as print
and summary
allow to show the model elements.
When the function is called, an R file with the same name as the .gcn file is created in the .gcn file directory. Additional files such as Latex documentation files or a logfile may be created when relevant options are set in the .gcn file.
load_model
function to load a .model.R
file created earlier.
1 2 3 4 5 6 7 | # copy the example to the current working directory
file.copy(from = file.path(system.file("examples", package = "gEcon"),
"rbc.gcn"), to = getwd())
# make and load the model
rbc <- make_model("rbc.gcn")
print(rbc)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.