Learn R Programming

edstan (version 1.1.0)

rescale_continuous: Rescale continuous covariates as appropriate for edstan models

Description

This function scales a covariate to have a mean of zero and standard deviation of 0.5.

Usage

rescale_continuous(x)

Value

A numeric vector, matrix, or data frame with rescaled covariates having mean of zero and standard deviation of 0.5.

Arguments

x

A numeric vector, matrix, or data frame

Examples

Run this code
vec <- rnorm(5, 100, 20)
rescale_continuous(vec)

mat <- matrix(rnorm(5*5, 100, 20), ncol = 5)
rescale_continuous(mat)

Run the code above in your browser using DataLab