Code Monkey home page Code Monkey logo

imputerobust's People

Contributors

dsalfran avatar lorenzwalthert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

imputerobust's Issues

mice.imput.gamlss example not working

Hello,

I'm trying to impute missing data from a highly overdispersed and zero-inflated count variable and came across your package.
After failing to use the 'gamlssZIP' on my data I tried to run the example from the help page and it seems to fail too (although there are no error messages), as there are no imputed values for X.2 and X.3 but only NAs when I do imputed.sets$imp$X.2.

I asked a colleague to try to run the example and it worked on his computer, which had the same package versions loaded but just differed by the fact that it's 64-bit Windows while mine is 32-bit.

I then asked him to run the function on a subset of my data but he got the same issue of having 'NA' instead of imputed values.

Below is the code I used and my sessionInfo() (I'm not attaching the data on GitHub, but can maybe send a subset privately if I get the authorization).

Thanks in advance for your help!
Thomas

sub_hydrat <- read.table("Stats_Hydratation/sub_data_Thomas.csv", header = TRUE, sep = ";")

head(sub_hydrat)

apply(sub_hydrat, 2, function(x){any(is.na(x))})
only GPAQ_ptotal has missing values

init_im <- mice(sub_hydrat, maxit=0, print=F)

im_pred <- init_im$predictorMatrix
im_pred[c("date_inclu", "FUP_irt", "irt", "FUP_deces", "deces", "conso_eau", "conso_eau_cls", "SEXE", "region_new", "AGEI", "origine_fac", "saison_fac", "tabac_fac", "neph_type_fac", "stadeincb", "fluide_ss_eau", "dfgin"),] <- 0

ZI_meth <- init_im$method
ZI_meth["GPAQ_ptotal"] <- "gamlssZIP"

im_ZIP <- mice(sub_hydrat, m = 1, maxit = 2, seed = 300119, meth = ZI_meth, pred = im_pred, n.cyc = 1, bf.cyc = 1, cyc = 1)

im_ZIP$imp$GPAQ_ptotal
gives a vector of NA instead of imputed data ...`

R version 3.5.1 (2018-07-02)
Platform: i386-w64-mingw32/i386 (32-bit)
Running under: Windows 7 (build 7601) Service Pack 1

Matrix products: default
locale:
[1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252
[3] LC_MONETARY=French_France.1252 LC_NUMERIC=C
[5] LC_TIME=French_France.1252

attached base packages:
[1] parallel splines stats graphics grDevices utils
[7] datasets methods base
other attached packages:
[1] bindrcpp_0.2.2 ImputeRobust_1.3-1 mice_3.3.0
[4] lattice_0.20-35 gamlss_5.1-2 nlme_3.1-137
[7] gamlss.dist_5.1-1 MASS_7.3-50 gamlss.data_5.1-0

loaded via a namespace (and not attached):
[1] digest_0.6.18 minqa_1.2.4 R6_2.3.0
[4] gWidgets_0.0-54.1 assertthat_0.2.0 grid_3.5.1
[7] tcltk_3.5.1 gWidgetstcltk_0.0-55 broom_0.5.1
[10] survival_2.42-3 tidyselect_0.2.5 extremevalues_2.3.2
[13] generics_0.0.2 lme4_1.1-19 pillar_1.3.0
[16] compiler_3.5.1 tibble_1.4.2 tidyr_0.8.2
[19] nnet_7.3-12 pkgconfig_2.0.2 pan_1.6
[22] purrr_0.2.5 Matrix_1.2-15 rstudioapi_0.8
[25] glue_1.3.0 mitml_0.3-7 magrittr_1.5
[28] rlang_0.3.0.1 yaml_2.2.0 tools_3.5.1
[31] bindr_0.1.1 dplyr_0.7.8 jomo_2.6-6
[34] nloptr_1.2.1 crayon_1.3.4 rpart_4.1-13
[37] backports_1.1.2 Rcpp_1.0.0

Some potential warnings(errors

Hello,
Thanks for contributing this package to CRAN. I have been looking for a way to impute data for variance function regression for quite a while.

I have noticed what I think are potentially bugs in the package. I am using version 1.1-1 and mice 2.30.

When running the example provided (the one in the documentation under the topic mice.impute.gamlss, I am getting the following error:

In file(file, if (append) "a" else "w") :
cannot open file '/dev/null': No such file or directory

and even though the program finishes and produces an object, there are no imputed values, and all missing values are still NA.

This error repeats several times when the code runs (12 times for the example above).

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.