Rescale continuous covariates as appropriate for edstan models
This function scales a covariate to have a mean of zero and standard deviation of 0.5.
rescale_continuous(x)
x
: A numeric vector, matrix, or data frameA numeric vector, matrix, or data frame with rescaled covariates having mean of zero and standard deviation of 0.5.
vec <- rnorm(5, 100, 20) rescale_continuous(vec) mat <- matrix(rnorm(5*5, 100, 20), ncol = 5) rescale_continuous(mat)
Useful links