simData {plaqr} | R Documentation |
Simulated Data
Description
A simulated data set to illustrate the functions in this package.
set.seed(4)
x1 <- rbinom(100, 1,.5)
x2 <- rnorm(100)
x3 <- rnorm(100)
z1 <- runif(100, 0, 1)
z2 <- runif(100, -1, 1)
y <- 3*x1 +1.5*x2 + 2*x3 + 5*sin(2*pi*z1) + 5*z2^3 + rnorm(100)
simData <- data.frame(y,x1,x2,x3,z1,z2)
Usage
data(simData)
Format
A data frame with 100 observations on the following 6 variables.
- y
response: expenditure
- x1
male/female (a linear term)
- x2
distance north/south from center (a linear term)
- x3
distance east/west from center (a linear term)
- z1
income/(max income) (a nonlinear term)
- z2
spending habits on a -1 to 1 scale (frugal to lavish) (a nonlinear term)
[Package plaqr version 2.0 Index]