sharpener | R Documentation |
The sharpener data
data(sharpener)
A data frame with 15 observations on the following 11 variables.
Y
the measured response; a numeric vector
X1
a measured predictor; a numeric vector
X2
a measured predictor; a numeric vector
X3
a measured predictor; a numeric vector
X4
a measured predictor; a numeric vector
X5
a measured predictor; a numeric vector
X6
a measured predictor; a numeric vector
X7
a measured predictor; a numeric vector
X8
a measured predictor; a numeric vector
X9
a measured predictor; a numeric vector
X10
a measured predictor; a numeric vector
The data come from a study about making a point.
### The data are actually random numbers, generated in R as follows: nxvars <- 10 # The number of explanatory variables nobs <- 15 # The number of observations set.seed(5000) # To ensure reproducibility # Ensure the response is normally distributed y <- round( rnorm( nobs,0,1), 2) + 10 # The explanatory variables rd <- runif( nxvars*nobs, 0, 1) rd <- round( matrix( rd, ncol=nxvars), 2) # Convert to a dataframe rdf <- data.frame( Y=y ) for (i in (1:nxvars)){ code <- paste( "rdf$X",i," <- rd[,",i,"]", sep="") eval( parse(text=code)) } head( rdf ) data(sharpener) head( sharpener )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.