{"action":"created","issue":{"url":"https://api.github.com/repos/benkeser/survtmle/issues/18","repository_url":"https://api.github.com/repos/benkeser/survtmle","labels_url":"https://api.github.com/repos/benkeser/survtmle/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/benkeser/survtmle/issues/18/comments","events_url":"https://api.github.com/repos/benkeser/survtmle/issues/18/events","html_url":"https://github.com/benkeser/survtmle/issues/18","id":244946931,"number":18,"title":"use of speedglm breaks timepoints","user":{"login":"nhejazi","id":8527276,"avatar_url":"https://avatars0.githubusercontent.com/u/8527276?v=4","gravatar_id":"","url":"https://api.github.com/users/nhejazi","html_url":"https://github.com/nhejazi","followers_url":"https://api.github.com/users/nhejazi/followers","following_url":"https://api.github.com/users/nhejazi/following{/other_user}","gists_url":"https://api.github.com/users/nhejazi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhejazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhejazi/subscriptions","organizations_url":"https://api.github.com/users/nhejazi/orgs","repos_url":"https://api.github.com/users/nhejazi/repos","events_url":"https://api.github.com/users/nhejazi/events{/privacy}","received_events_url":"https://api.github.com/users/nhejazi/received_events","type":"User","site_admin":false},"labels":[{"id":447847098,"url":"https://api.github.com/repos/benkeser/survtmle/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":{"login":"nhejazi","id":8527276,"avatar_url":"https://avatars0.githubusercontent.com/u/8527276?v=4","gravatar_id":"","url":"https://api.github.com/users/nhejazi","html_url":"https://github.com/nhejazi","followers_url":"https://api.github.com/users/nhejazi/followers","following_url":"https://api.github.com/users/nhejazi/following{/other_user}","gists_url":"https://api.github.com/users/nhejazi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhejazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhejazi/subscriptions","organizations_url":"https://api.github.com/users/nhejazi/orgs","repos_url":"https://api.github.com/users/nhejazi/repos","events_url":"https://api.github.com/users/nhejazi/events{/privacy}","received_events_url":"https://api.github.com/users/nhejazi/received_events","type":"User","site_admin":false},"assignees":[{"login":"nhejazi","id":8527276,"avatar_url":"https://avatars0.githubusercontent.com/u/8527276?v=4","gravatar_id":"","url":"https://api.github.com/users/nhejazi","html_url":"https://github.com/nhejazi","followers_url":"https://api.github.com/users/nhejazi/followers","following_url":"https://api.github.com/users/nhejazi/following{/other_user}","gists_url":"https://api.github.com/users/nhejazi/gists{/gist_id}","starred_url":"https://api.github.com/users/nhejazi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhejazi/subscriptions","organizations_url":"https://api.github.com/users/nhejazi/orgs","repos_url":"https://api.github.com/users/nhejazi/repos","events_url":"https://api.github.com/users/nhejazi/events{/privacy}","received_events_url":"https://api.github.com/users/nhejazi/received_events","type":"User","site_admin":false},{"login":"benkeser","id":17482713,"avatar_url":"https://avatars0.githubusercontent.com/u/17482713?v=4","gravatar_id":"","url":"https://api.github.com/users/benkeser","html_url":"https://github.com/benkeser","followers_url":"https://api.github.com/users/benkeser/followers","following_url":"https://api.github.com/users/benkeser/following{/other_user}","gists_url":"https://api.github.com/users/benkeser/gists{/gist_id}","starred_url":"https://api.github.com/users/benkeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkeser/subscriptions","organizations_url":"https://api.github.com/users/benkeser/orgs","repos_url":"https://api.github.com/users/benkeser/repos","events_url":"https://api.github.com/users/benkeser/events{/privacy}","received_events_url":"https://api.github.com/users/benkeser/received_events","type":"User","site_admin":false}],"milestone":null,"comments":8,"created_at":"2017-07-24T00:22:21Z","updated_at":"2017-07-24T23:58:06Z","closed_at":null,"body":"631c0d8 implemented fixes in the wrapper function `fast_glm`, which now allows `speedglm` to be invoked in the various `estimate...` functions as well as in `fluctuateIteratedMean`.\r\n\r\nUnfortunately, this causes an error in `timepoints` -- in particular, `outList[[ct]] <- do.call(\"survtmle\", args = funOpts)` [line 112 in branch `speedglm`] contributes to the failure.\r\n\r\nThe exact version of the package I've been using is here: [survtmle_1.0.1.tar.gz](https://github.com/benkeser/survtmle/files/1168541/survtmle_1.0.1.tar.gz) -- probably best to `install.packages(..., type = \"source\")` to reproduce this error.\r\n\r\n```\r\nlibrary(survtmle)\r\nset.seed(341796)\r\n\r\n# simulate data\r\nn <- 100\r\nt_0 <- 10\r\nW <- data.frame(W1 = runif(n), W2 = rbinom(n, 1, 0.5))\r\nA <- rbinom(n, 1, 0.5)\r\nT <- rgeom(n,plogis(-4 + W$W1 * W$W2 - A)) + 1\r\nC <- rgeom(n, plogis(-6 + W$W1)) + 1\r\nftime <- pmin(T, C)\r\nftype <- as.numeric(ftime == T)\r\n\r\n# apply survtmle for estimation\r\nfit <- survtmle(ftime = ftime, ftype = ftype,\r\n                 trt = A, adjustVars = W,\r\n                 glm.trt = \"1\",\r\n                 glm.ftime = \"I(W1*W2) + trt + t\",\r\n                 glm.ctime = \"W1 + t\", method = \"hazard\",\r\n                 t0 = t_0)\r\n\r\n'speedglm' ran into an error...trying 'glm'...go have a coffee.\r\nWarning message:\r\nIn hazard_tmle(ftime = clean$ftime, ftype = clean$ftype, trt = clean$trt,  :\r\n  TMLE fluctuations did not converge. Check that meanIC is adequately\r\n            small and proceed with caution.\r\n\r\ntpfit <- timepoints(fit, times = seq_len(t_0))\r\n'speedglm' ran into an error...trying 'glm'...go have a coffee.\r\nError in terms.formula(formula, data = data) :\r\n  invalid model formula in ExtractVars\r\nIn addition: Warning message:\r\nIn if (grepl(\"factor(t)\", glm.ctime)) { :\r\n  the condition has length > 1 and only the first element will be used\r\n```\r\nExample taken from `README`.\r\n\r\nand `sessionInfo()`:\r\n```\r\n❯ sessionInfo()\r\nR version 3.4.1 (2017-06-30)\r\nPlatform: x86_64-apple-darwin16.6.0 (64-bit)\r\nRunning under: macOS Sierra 10.12.5\r\n\r\nMatrix products: default\r\nBLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib\r\nLAPACK: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib\r\n\r\nlocale:\r\n[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8\r\n\r\nattached base packages:\r\n[1] stats     graphics  grDevices utils     datasets  methods   base\r\n\r\nother attached packages:\r\n [1] survtmle_1.0.1       forcats_0.2.0        stringr_1.2.0.9000\r\n [4] dplyr_0.7.2          purrr_0.2.2.2        readr_1.1.1\r\n [7] tidyr_0.6.3          tibble_1.3.3         ggplot2_2.2.1\r\n[10] tidyverse_1.1.1.9000 devtools_1.13.2.9000 nima_0.4.0\r\n[13] fcuk_0.1.21          colorout_1.1-2       prompt_1.0.0\r\n\r\nloaded via a namespace (and not attached):\r\n [1] Rcpp_0.12.12             stringdist_0.9.4.4       lubridate_1.6.0.9009\r\n [4] lattice_0.20-35          clisymbols_1.2.0         gtools_3.5.0\r\n [7] assertthat_0.2.0         digest_0.6.12            psych_1.7.5\r\n[10] R6_2.2.2                 cellranger_1.1.0         plyr_1.8.4\r\n[13] nnls_1.4                 httr_1.2.1               rlang_0.1.1.9000\r\n[16] lazyeval_0.2.0           readxl_1.0.0             rstudioapi_0.6\r\n[19] ProjectTemplate_0.7      Matrix_1.2-10            boxes_0.0.0.9000\r\n[22] foreign_0.8-69           munsell_0.4.3            broom_0.4.2\r\n[25] compiler_3.4.1           modelr_0.1.0             pkgconfig_2.0.1\r\n[28] mnormt_1.5-5             pkgbuild_0.0.0.9000      speedglm_0.3-2\r\n[31] gridExtra_2.2.1          crayon_1.3.2.9000        withr_1.0.2\r\n[34] MASS_7.3-47              grid_3.4.1               nlme_3.1-131\r\n[37] jsonlite_1.5             gtable_0.2.0             DBI_0.7\r\n[40] magrittr_1.5             scales_0.4.1.9002        stringi_1.1.5\r\n[43] reshape2_1.4.2           ggthemes_3.4.0           bindrcpp_0.2\r\n[46] xml2_1.1.1               tools_3.4.1              glue_1.1.1\r\n[49] hms_0.3                  pkgload_0.0.0.9000       parallel_3.4.1\r\n[52] colorspace_1.3-2         SuperLearner_2.0-23-9000 rvest_0.3.2\r\n[55] memoise_1.1.0            bindr_0.1                haven_1.1.0\r\n```\r\n\r\n@benkeser, I think you might be able to come up with thoughts on where this bug is originating since you're a bit more familiar with the core code base -- any thoughts?"},"comment":{"url":"https://api.github.com/repos/benkeser/survtmle/issues/comments/317588640","html_url":"https://github.com/benkeser/survtmle/issues/18#issuecomment-317588640","issue_url":"https://api.github.com/repos/benkeser/survtmle/issues/18","id":317588640,"user":{"login":"benkeser","id":17482713,"avatar_url":"https://avatars0.githubusercontent.com/u/17482713?v=4","gravatar_id":"","url":"https://api.github.com/users/benkeser","html_url":"https://github.com/benkeser","followers_url":"https://api.github.com/users/benkeser/followers","following_url":"https://api.github.com/users/benkeser/following{/other_user}","gists_url":"https://api.github.com/users/benkeser/gists{/gist_id}","starred_url":"https://api.github.com/users/benkeser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benkeser/subscriptions","organizations_url":"https://api.github.com/users/benkeser/orgs","repos_url":"https://api.github.com/users/benkeser/repos","events_url":"https://api.github.com/users/benkeser/events{/privacy}","received_events_url":"https://api.github.com/users/benkeser/received_events","type":"User","site_admin":false},"created_at":"2017-07-24T23:58:06Z","updated_at":"2017-07-24T23:58:06Z","body":"Yeah, something is broken, but I can't tell what yet. "}}
{"actor":{"display_login":"benkeser"}}