uncenter: Uncenter

Description Usage Arguments Value Examples

View source: R/exportPrep.R

Description

A function to uncenter binary variables that have been centered using the arm package

Usage

1

Arguments

x

a vector with two distinct values that was previously a binary variable

Value

a vector, length x, with two distinct values, 0 and 1

Examples

1
2
3
x <- rbinom(100, 1, prob = .3)
scaleX <- x - mean(x)
identical(x, as.integer(uncenter(scaleX)))

jknowles/ModelEWS documentation built on May 19, 2019, 11:42 a.m.