# scale_vars

From minMSE v0.1.1
by Sebastian Schneider

##### Covariate Vectors Scaling

Scales the data such that the empty fiels (NA) are the mean of the column and all variables are scaled to have variance 1. In case a variable has cero variance, the variable internally is treated as if it was 0, that way it is not taken into account for treatment assignment.

- Keywords
- treatment, optim, Assignment, MSE

##### Usage

`scale_vars(data)`

##### Arguments

- data
a dataframe containing the covariate vectors for each attribute.

##### Value

Returns a dataframe where the empty fields are filled with the mean of the column, and for all variables the variance is 1.

##### Examples

```
# NOT RUN {
input <- data.frame(c(10, 20, 30, 40, 130, 40, 120, 5, 10, 80),
c(2, 6, 2, 8, 1, 10, 9, 8, 7, 5),
c(1, 0, 2, 1, 0, 1, 0, 2, 1, 0))
colnames(input) <- c("IQ", "grade_maths", "both_parents")
scale_vars(input)
# }
```

*Documentation reproduced from package minMSE, version 0.1.1, License: GNU General Public License*

### Community examples

Looks like there are no examples yet.