Description Usage Arguments Details Value References Examples

Standardize a Vector

1 | ```
standardize2(x, scale = TRUE)
``` |

`x` |
numeric vector |

`scale` |
scale variable by twice its standard deviation? |

The function mean-centers values in the vector and scale them by twice their standard deviation. The function ignores all missing values.

standardized `vector`

.

Gelman, A. (2008). Scaling Regression Inputs by Dividing by two Standard Deviations. Statistics in Medicine 27(2865–2873).

1 2 3 4 5 6 7 8 | ```
## Not run:
x <- runif(100, 0, 1.2)
xz <- standardize2(x)
sd(xz)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.