在 rstan 中,是通过列表指定的初始参数值应用于约束支持还是无约束支持?

In rstan, are initial parameter values that are specified via a list applied on the constrained support or the unconstrained support?

rstan::stan 的帮助文件对 init 参数有以下说明:

init="random" (default):

  • Let Stan generate random initial values for all parameters. The seed of the random number generator used by Stan can be specified via the seed argument. If the seed for Stan is fixed, the same initial values are used. The default is to randomly generate initial values between -2 and 2 on the unconstrained support. The optional additional parameter init_r can be set to some value other than 2 to change the range of the randomly generated inits.

init="0", init=0:

  • Initialize all parameters to zero on the unconstrained support.

inits via list:

  • Set inital values by providing a list equal in length to the number of chains. The elements of this list should themselves be named lists, where each of these named lists has the name of a parameter and is used to specify the initial values for that parameter for the corresponding chain.

不幸的是,这并不清楚通过列表指定的初始参数值是应用于约束支撑还是无约束支撑。例如,如果我有以下参数块,

parameters {
    real<lower=3, upper=7> theta;
}

我调用 stan 如下,

rstan::stan(file, data = standata, init = list(list(theta = 5)), chains = 1)

theta的初始值是约束支撑还是无约束支撑上的5?

约束。在 documentation 中,它表示当 init 是列表的列表时

The elements of this list should themselves be named lists, where each of these named lists has the name of a parameter and is used to specify the initial values for that parameter for the corresponding chain.

如果它属于 Stan 程序的 parameters 块,那么它指的是受约束的 space。对于协方差矩阵、单纯形等

,无约束 space 不一定与受约束 space 的维度相匹配