Description Usage Arguments Details Value Examples
Creates variable declarations for Stan programs
1 | create.declaration(var.name, var.type, var.dim)
|
var.name |
String indicating the name of the variable |
var.type |
String indicating the variable type and any restrictions |
var.dim |
String or number indicating the dimension of the variable |
This method allows for easy creation of variable declarations, accounting for semantic differences in declaring vectors vs. arrays.
If var.dim is a string, it should be in the form of dimension declarations in a Stan program (e.g., "[N, k]").
A string for the resulting variable declaration.
1 2 3 | create.declaration("foo", "real<lower=0>", 5)
create.declaration("bar", "vector", "[k]")
create.declaration("mat", "matrix", "[N, k]")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.