| simulateddata | R Documentation |
Both the traindata and testdata dataframe are synthetically generated data sets to illustrate the functionality of the package. The traindata has 1000 observations and the testdata has 500 observations. The same settings were used to generate both data sets.
data(traindata)
data(testdata)
ythe binary outcome variable
x1covariate 1
x2covariate 2
x3covariate 3
x4covariate 4
See the examples for how the data sets were generated.
# The data sets were generated as follows
set.seed(1782)
# Simulate training data
nTrain = 1000
B = c(0.1, 0.5, 1.2, -0.75, 0.8)
X = replicate(4, rnorm(nTrain))
p0true = binomial()$linkinv(cbind(1, X) %*% B)
y = rbinom(nTrain, 1, p0true)
colnames(X) = paste0("x", seq_len(ncol(X)))
traindata = data.frame(y, X)
# Simulate validation data
nTest = 500
X = replicate(4, rnorm(nTest))
p0true = binomial()$linkinv(cbind(1, X) %*% B)
y = rbinom(nTest, 1, p0true)
colnames(X) = paste0("x", seq_len(ncol(X)))
testdata = data.frame(y, X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.