blindDataRegression: Suitable for regression: This function is a main function....

Description Usage Arguments Examples

View source: R/blindDataRegression.R

Description

Suitable for regression: This function is a main function. blindDataRegression allows the user to blind a dataset that is intended for regression

Usage

1
2
3
4
5
6
7
8
blindDataRegression(
  df_original,
  y,
  predictors,
  blinding_method = c("AverageWithNoisePerCase", "AddBiasToCoefficients",
    "CreateNewCoefficients", "ScrambleOutcome", "ScramblePredictors"),
  update_labels = TRUE
)

Arguments

df_original

# original dataframe

y

# name of dependent variable

predictors

# name of predictors, for example c("expert", "conflict)

blinding_method

# name of blinding method to apply to the dataset user can input any of the following blinding methods c("AverageWithNoisePerCase", "AddBiasToCoefficients", "CreateNewCoefficients", "ScrambleOutcome", "ScramblePredictors")

update_labels

# if TRUE update labels to BLIND_[abbrevation]_[name]

Examples

1
2
3
4
5
6
blindDataRegression(
df_original = data.frame(sickleave = 0:10, var1 = 100:110, var2 = 200:210),
y = "sickleave",
blinding_method = "AverageWithNoisePerCase",
predictors = c("var1", "var2")
)

rjbderooij/blindData_Git documentation built on Dec. 20, 2020, 5:17 a.m.