This function standardizes a variable by centering and dividing by 2 sd's with exceptions for binary variables.

1 | ```
rescale(x, binary.inputs="center")
``` |

`x` |
a vector |

`binary.inputs` |
options for standardizing binary variables, default is |

the standardized vector

Andrew Gelman gelman@stat.columbia.edu; Yu-Sung Su suyusung@tsinghua.edu.cn

Andrew Gelman. (2008).
“Scaling regression inputs by dividing by two standard deviations”.
*Statistics in Medicine* 27: 2865–2873.
http://www.stat.columbia.edu/~gelman/research/published/standardizing7.pdf

`standardize`

1 2 3 4 5 6 7 8 9 10 11 12 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.