15.1 Continuous and binary predictors

First, create simulated continuous predictor \(x_1\) and binary predictor \(x_2\).

Code
set.seed(1)
n = 10000

## Create x data
x1 =  runif(n, min = 0, max = 1)
x2 = rdunif(n, b   = 0, a   = 1)

## Put them in a data frame
dg = data.frame(x1, x2)