Skip to content

Commit

Permalink
3.17-6
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderrobitzsch committed Feb 20, 2023
1 parent 996e07f commit fd560a9
Show file tree
Hide file tree
Showing 15 changed files with 34 additions and 25 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: miceadds
Type: Package
Title: Some Additional Multiple Imputation Functions, Especially for 'mice'
Version: 3.17-1
Date: 2023-01-07 17:20:57
Version: 3.17-6
Date: 2023-02-20 15:12:34
Author:
Alexander Robitzsch [aut,cre] (<https://orcid.org/0000-0002-8226-3132>),
Simon Grund [aut] (<https://orcid.org/0000-0002-1290-8986>),
Expand Down
2 changes: 1 addition & 1 deletion R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: RcppExports.R
## File Version: 3.017001
## File Version: 3.017006
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

Expand Down
5 changes: 4 additions & 1 deletion R/mice.impute.pls.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: mice.impute.pls.R
## File Version: 3.745
## File Version: 3.752


mice.impute.pls <- function(y, ry, x, type, pls.facs=NULL,
Expand Down Expand Up @@ -54,6 +54,9 @@ mice.impute.pls <- function(y, ry, x, type, pls.facs=NULL,
# define minimal correlation for interactions
min.int.cor <- mice_imputation_extract_list_arguments( min.int.cor, vname, 0 )

# proportion of explained variance in PCA
pcamaxcols <- mice_imputation_extract_list_arguments( pcamaxcols, vname, 1e9 )

#*** print progress | print section 1
res <- mice_imputation_pls_print_progress1( pls.print.progress=pls.print.progress,
vname=vname, print.dims=print.dims, y=y, ry=ry, x=x, type=type )
Expand Down
4 changes: 2 additions & 2 deletions R/mice_imputation_pls_do_impute.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: mice_imputation_pls_do_impute.R
## File Version: 0.207
## File Version: 0.212

mice_imputation_pls_do_impute <- function( x, y, ry, imputationWeights,
use_weights, pls.impMethod, pls.print.progress,
Expand All @@ -8,7 +8,6 @@ mice_imputation_pls_do_impute <- function( x, y, ry, imputationWeights,
# clean missing values
x <- as.matrix(x)
x <- mice_imputation_pls_clean_missings(x=x, eps=1e-12)

colnames(x) <- gsub(" ", "", colnames(x) )

#*** logical whether an imputation should be conducted
Expand Down Expand Up @@ -63,6 +62,7 @@ mice_imputation_pls_do_impute <- function( x, y, ry, imputationWeights,
x1 <- mice_imputation_pls_pmm_match(yhatobs=yhatobs, yhatmis=yhatmis,
y=y, ry=ry, donors=donors)
}

if ( ! ( pls.impMethod %in% imp_methods_special) ){
if (use_boot){
warning( paste0("Argument 'use_boot' cannot be used for imputation ",
Expand Down
14 changes: 10 additions & 4 deletions R/mice_imputation_pls_pca_reduction.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
## File Name: mice_imputation_pls_pca_reduction.R
## File Version: 0.13
## File Version: 0.147


mice_imputation_pls_pca_reduction <- function(x, pcamaxcols,
pls.print.progress, imputationWeights=NULL, use_weights=FALSE)
{
if (! use_weights ){ imputationWeights <- NULL }
if (! use_weights ){
imputationWeights <- NULL
}
if ( ncol(x) > pcamaxcols ){
a0 <- Sys.time()
NX <- nrow(x)
Expand All @@ -25,7 +27,11 @@ mice_imputation_pls_pca_reduction <- function(x, pcamaxcols,
xpca <- pca.covridge(x=x, wt=imputationWeights)
varexpl <- xpca$sdev^2
varexpl <- cumsum( varexpl / sum( varexpl) * 100 )
xdims <- which( varexpl > 100*pcamaxcols )[1]
if (pcamaxcols<1){
xdims <- which( varexpl > 100*pcamaxcols )[1]
} else {
xdims <- pcamaxcols
}
if (pls.print.progress){
cat( " ->", xdims, "extracted dimensions\n")
cat("Explained variance:", round( varexpl[ xdims], 2 ), " % " )
Expand All @@ -35,7 +41,7 @@ mice_imputation_pls_pca_reduction <- function(x, pcamaxcols,
if (pls.print.progress){
cat("\nTime needed:", a1-a0, "\n")
}
}
} # PCA dimension reduction
#--- output
return(x)
}
2 changes: 1 addition & 1 deletion R/syn_da_create_formula.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## File Name: syn_da_create_formula.R
## File Version: 0.03
## File Version: 0.04

syn_da_create_formula <- function(wv, ord_vars)
{
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ The CRAN version can be installed from within R using:
utils::install.packages("miceadds")
```

#### GitHub version `miceadds` 3.17-1 (2023-01-07)
#### GitHub version `miceadds` 3.17-6 (2023-02-20)

[![](https://img.shields.io/badge/github%20version-3.17--1-orange.svg)](https://github.com/alexanderrobitzsch/miceadds)&#160;&#160;
[![](https://img.shields.io/badge/github%20version-3.17--6-orange.svg)](https://github.com/alexanderrobitzsch/miceadds)&#160;&#160;

The version hosted [here](https://github.com/alexanderrobitzsch/miceadds) is the development version of `miceadds`.
The GitHub version can be installed from within R using:
Expand Down
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ pandoc: 1.13.1
pkgdown: 1.5.1
pkgdown_sha: ~
articles: []
last_built: 2023-01-07T16:32Z
last_built: 2023-02-20T14:24Z

2 changes: 1 addition & 1 deletion docs/reference/mice.impute.pls.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ CHANGELOG miceadds


--------------------------------------------------------------------------
VERSIONS miceadds 3.17 | 2023-01-07 | Last: miceadds 3.17-1
VERSIONS miceadds 3.17 | 2023-02-20 | Last: miceadds 3.17-6
--------------------------------------------------------------------------

xxx * ---
Expand Down
4 changes: 2 additions & 2 deletions man/mice.impute.pls.Rd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%% File Name: mice.impute.pls.Rd
%% File Version: 2.383
%% File Version: 2.384

\name{mice.impute.pls}
\alias{mice.impute.pls}
Expand Down Expand Up @@ -81,7 +81,7 @@ Vector of sample weights to be used in imputation models.
}
\item{pcamaxcols}{
Amount of variance explained by principal components (must be a number between
0 and 1)
0 and 1) or number of factors used in PCA (an integer larger than 1).
}
\item{min.int.cor}{
Minimum absolute correlation for an interaction of two predictors
Expand Down
2 changes: 1 addition & 1 deletion src/RcppExports.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//// File Name: RcppExports.cpp
//// File Version: 3.017001
//// File Version: 3.017006
// Generated by using Rcpp::compileAttributes() -> do not edit by hand
// Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

Expand Down

0 comments on commit fd560a9

Please sign in to comment.