| GSPCRexdata {gspcr} | R Documentation |
GSPCR example data
Description
Contains a data set used to develop and test the main features of the gspcr package. The data contains a dependent variable and 50 predictors generated based on true number of principal components.
Format
GSPCRexdata is a list containing two data.frame objects:
-
X: A list of data.frames with 1000 rows (observations) and 50 columns (possible predictors). The list contains matrices storing data coded with different measurement levels:-
contwith 50 continuous variables -
binwith 50 binary variables (factors) -
ordwith 50 ordinal variables (ordered factors) -
catwith 50 categorical variables (unordered factors) -
mixwith 20 continuous variables, 10 binary variables (factors), 10 ordinal variables (ordered factors), 10 categorical variables (unordered factors).
-
-
y: A data.frame with 1000 rows and 5 columns. The first columncontis a continuous variable produced using a linear model with the first two PCs underlyingXas a data-generating model. The other columns are transformed versions ofcontto match common discrete target distribution in the social sciences. These are the variables stored:-
contcontinuous dependent variable (numeric vector) -
binbinary dependent variable (factor) -
ordordinal dependent variable (ordered factor) -
catnominal dependent variable (unordered factor) -
poiscount dependent variable (numeric vector)
-
Examples
# Check out the first 6 rows of the continuous predictors
head(GSPCRexdata$X$cont)
# Check out first 6 rows of the dv data.frame
head(GSPCRexdata$y)