Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lots of "In FUN(newX[, i], ...) : no non-missing arguments to min; returning Inf" warning but no errors #3

Closed
Deleetdk opened this issue May 5, 2015 · 4 comments

Comments

@Deleetdk
Copy link

Deleetdk commented May 5, 2015

Often when I use irmi() I get a number of these warnings, but there does not appear to be problems with the input data or the outputted data.

Initial data by matrixplot()
irmi_initial

After
irmi_after

The dataset is this, which is part of a yet to be released project.

Run this code to reproduce:

#S factor
s.data = subset(names.df, select=c("no.job","own.place","married",
                                   "conviction", "income",
                                   "age"))

#missing data
if (F){ #run manually when needed
  matrixplot2(s.data)
  matrixplot(s.data)
  miss.table(s.data)
  miss.hist(s.data)
  ggsave("figures/missing_histogram.png")
}

#impute data
s.data = s.data[miss.case(s.data)<=2,] #subset to cases with 0 or 1 NA
s.data = irmi(s.data) #impute data
@matthias-da
Copy link
Collaborator

Is it because you have NaN's in names.csv instead of NA's? Please try that.
Otherwise, there could be some warnings from nnet or other functions used.
In any case, your example is not reproducible, I missed miss.case(), for example.

Best,
Matthias

P.S.:
Please cite this
http://link.springer.com/article/10.1007%2Fs11634-011-0102-y

instead of
Templ, M., Alfons, A., Kowarik, A., & Prantner, B. (2015, February 19). VIM: Visualization and Imputation of Missing Values. CRAN. Retrieved from http://cran.r-project.org/web/packages/VIM/index.html

@Deleetdk
Copy link
Author

Deleetdk commented May 6, 2015

No NaNs, only NAs.

Sorry, miss.case() is from here.

@matthias-da
Copy link
Collaborator

I still see NaN in names.csv but it should be NA.

@alexkowa
Copy link
Member

With the code below, which is your example made reproducible!? I cannot reproduce any warnings with the Github-Version of the package.

require(VIM)
source("https://raw.githubusercontent.com/Deleetdk/psych2/master/psych2.R")
names.df <- read.csv("https://osf.io/xf8py/?action=download&version=1")
#S factor
s.data = subset(names.df, select=c("no.job","own.place","married",
                "conviction", "income",
                "age"))

#missing data
if (F){ #run manually when needed
    matrixplot2(s.data)
    matrixplot(s.data)
    miss.table(s.data)
    miss.hist(s.data)
    ggsave("figures/missing_histogram.png")
}

#impute data
s.data = s.data[miss.case(s.data)<=2,] #subset to cases with 0 or 1 NA
s.data = irmi(s.data) #impute data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants