Closed
Description
Summary:
Example: https://mc-stan.org/docs/2_26/stan-users-guide/QR-reparameterization-section.html
The transformed data could be rewritten from
transformed data {
matrix[N, K] Q_ast;
matrix[K, K] R_ast;
matrix[K, K] R_ast_inverse;
// thin and scale the QR decomposition
Q_ast = qr_thin_Q(x) * sqrt(N - 1);
R_ast = qr_thin_R(x) / sqrt(N - 1);
R_ast_inverse = inverse(R_ast);
}
to
transformed data {
// thin and scale the QR decomposition
matrix[N, K] Q_ast = qr_thin_Q(x) * sqrt(N - 1);
matrix[K, K] R_ast = qr_thin_R(x) / sqrt(N - 1);
matrix[K, K] R_ast_inverse = inverse(R_ast);
}
So removing deprecated syntax and use shorter and cleaner sytnax where possible.
Essentialy what @andrjohns did in stan-dev/example-models#190.
This is a good issue for anyone looking to contribute but doesnt know where to start.