Learn R Programming

bscaling (version 1.0)

sc01: Scaler

Description

It scales the vector of a quantitative response variable, such as the one for binary logistic regression model, as 0s and 1s based on a cutoff.

Usage

sc01(x, scm)

Arguments

x

a numeric, integer or double, vector object

scm

the cutoff value obtainable by a case(subject) on a single variable

Value

a data frame object of a binary-coded variable

Details

The functioon is very handy for scaling the response variable in a binary logistic regression model. The argument x can be calculated using the function vsc and scm is based on researcher's judgment.

Examples

Run this code
# NOT RUN {
vct <- c(15,24,20,25,14)
# }
# NOT RUN {
scm = 15
# }
# NOT RUN {
dtf <- sc01(vct, 15)
# }

Run the code above in your browser using DataLab