View source: R/main-declarations.R
stan_vector_array | R Documentation |
Create a StanVectorArray object.
stan_vector_array(name, dims, length, lower = NULL, upper = NULL)
name |
name of the vector array |
dims |
list of array dimensions, must be a list of StanDimension objects |
length |
length of the vector, must be a StanDimension object |
lower |
lower bound |
upper |
upper bound |
Other Stan variable declaration functions:
stan_array()
,
stan_dim()
,
stan_matrix()
,
stan_param()
,
stan_transform()
,
stan_var()
,
stan_vector()
N <- stan_dim("N")
D <- stan_dim("D")
vec_arr <- stan_vector_array("y", dims = list(N), length = D)
print(vec_arr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.