This is an old version, view current version.

10.5 Affinely Transformed Scalar

Stan uses an affine transform to be able to specify parameters with a given offset and multiplier.

Affine Transform

For variables with expected offset μ and/or (positive) multiplier σ, Stan uses an affine transform. Such a variable X is transformed to a new variable Y, where

Y=μ+σX.

The default value for the offset μ is 0 and for the multiplier σ is 1 in case not both are specified.

Affine Inverse Transform

The inverse of this transform is

X=Yμσ.

10.5.1 Absolute Derivative of the Affine Inverse Transform

The absolute derivative of the affine inverse transform is

|ddy(yμσ)|=1σ.

Therefore, the density of the transformed variable Y is

pY(y)=pX(yμσ)1σ.