-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from EdoardoCostantini:develop
deploy 0.9.1
- Loading branch information
Showing
90 changed files
with
11,951 additions
and
1,234 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
Package: gspcr | ||
Title: Generalized Supervised Principal Component Regression | ||
Version: 0.0.0.9000 | ||
Version: 0.9.1 | ||
Authors@R: | ||
person("Edoardo", "Costantini", , "[email protected]", role = c("aut", "cre"), | ||
comment = c(ORCID = "YOUR-ORCID-ID")) | ||
Description: The sparse principal component regression is computed. The regularization parameters and number of components are optimized by cross-validation. | ||
License: MIT + file LICENSE | ||
Encoding: UTF-8 | ||
Roxygen: list(markdown = TRUE) | ||
RoxygenNote: 7.2.2 | ||
RoxygenNote: 7.2.3 | ||
Suggests: | ||
klippy, | ||
knitr, | ||
lmtest, | ||
patchwork, | ||
rmarkdown, | ||
superpc, | ||
testthat (>= 3.0.0) | ||
Config/testthat/edition: 3 | ||
Depends: | ||
|
@@ -24,6 +28,7 @@ Imports: | |
MASS, | ||
MLmetrics, | ||
nnet, | ||
PCAmixdata, | ||
reshape2, | ||
rlang | ||
VignetteBuilder: knitr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,29 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
S3method(plot,gspcrout) | ||
S3method(plot,gspcrcv) | ||
S3method(predict,gspcrout) | ||
export(LL_baseline) | ||
export(LL_binomial) | ||
export(LL_cumulative) | ||
export(LL_gaussian) | ||
export(LL_newdata) | ||
export(LL_poisson) | ||
export(compute_sc) | ||
export(cp_AIC) | ||
export(cp_BIC) | ||
export(cp_F) | ||
export(cp_LRT) | ||
export(cp_gR2) | ||
export(cp_pc_scores) | ||
export(cp_thrs_LLS) | ||
export(cp_thrs_NOR) | ||
export(cp_thrs_PR2) | ||
export(cp_validation_fit) | ||
export(cv_average) | ||
export(cv_choose) | ||
export(cv_gspcr) | ||
export(est_gspcr) | ||
export(est_univ_mods) | ||
export(pca_mix) | ||
importFrom(dplyr,"%>%") | ||
importFrom(rlang,.data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#' CFA example data | ||
#' | ||
#' Contains a data set used to develop and test the main features of the \code{gspcr} package. The data contains 50 predictors generated based on true number of principal components. | ||
#' | ||
#' @name CFA_data | ||
#' @docType data | ||
#' @format \code{CFA_data} is a list containing two objects: | ||
#' - \code{X}: A data.frame with 5000 rows (observations) and 30 columns (possible predictors.) This data was generated based on a CFA model describing 10 independent latent variables measured by 3 items each, and a factor loading matrix describing simple structure. | ||
#' - \code{y}: A numeric vector of length 1000. This variable was genearted as a linear combination of 5 latent variables used to generate \code{X}. | ||
#' @details | ||
#' A supervised PCA approach should identify that only 5 components are useful for the prediction of \code{y} and that only the first 15 variables should be used to compute them. | ||
#' @keywords datasets | ||
#' @examples | ||
#' # Check out the first 6 rows of the predictors | ||
#' head(CFA_data$X) | ||
#' | ||
#' # Check out first 6 elements of the dependent variable | ||
#' head(CFA_data$y) | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,29 @@ | ||
#' GSPCR example data | ||
#' | ||
#' A data.frame with a dependent variable and 50 predictors generated based on true principal components. | ||
#' Contains a data set used to develop and test the main features of the \code{gspcr} package. The data contains a dependent variable and 50 predictors generated based on true number of principal components. | ||
#' | ||
#' @name GSPCRexdata | ||
#' @docType data | ||
#' @format \code{GSPCRexdata} is a list containing two data.frame objects: | ||
#' \describe{ | ||
#' \item{X}{A data.frame with 1000 rows and 50 columns of possible predictors. These predictors were generated such that 30% of their total variability could be explained by 5 principal components.} | ||
#' \item{y}{A data.frame with 1000 rows and 4 columns. The first column \code{cont} is a continuous variable produced using a linear model with the first two PCs underlying \code{X} as a data-generating model. The other columns are transformed versions of \code{cont} to match common discrete target distribution in the social sciences.} | ||
#' } | ||
#' - \code{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: | ||
#' - \code{cont} with 50 continuous variables | ||
#' - \code{bin} with 50 binary variables (factors) | ||
#' - \code{ord} with 50 ordinal variables (ordered factors) | ||
#' - \code{cat} with 50 categorical variables (unordered factors) | ||
#' - \code{mix} with 20 continuous variables, 10 binary variables (factors), 10 ordinal variables (ordered factors), 10 categorical variables (unordered factors). | ||
#' - \code{y}: A data.frame with 1000 rows and 5 columns. The first column \code{cont} is a continuous variable produced using a linear model with the first two PCs underlying \code{X} as a data-generating model. | ||
#' The other columns are transformed versions of \code{cont} to match common discrete target distribution in the social sciences. | ||
#' These are the variables stored: | ||
#' - \code{cont} continuous dependent variable (numeric vector) | ||
#' - \code{bin} binary dependent variable (factor) | ||
#' - \code{ord} ordinal dependent variable (ordered factor) | ||
#' - \code{cat} nominal dependent variable (unordered factor) | ||
#' - \code{pois} count dependent variable (numeric vector) | ||
#' @keywords datasets | ||
#' @examples | ||
#' | ||
#' data <- GSPCRexdata | ||
#' head(GSPCRexdata) | ||
#' # 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) | ||
NULL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.