-
Notifications
You must be signed in to change notification settings - Fork 109
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
Object created from pool() is empty but producing mean estimate when using summary() #676
Comments
evielopoo
changed the title
Object created from pool() is empty but producing a summary()
Object created from pool() is empty but producing mean estimate when using summary()
Oct 10, 2024
The |
Also, try |
I am not able to reproduce your problem. library(mice, warn.conflicts = FALSE)
library(survival)
set.seed(1)
data <- survival::lung
data$age[rbinom(nrow(data), size = 1, prob = 0.2) == 1] <- NA
data$sex[rbinom(nrow(data), size = 1, prob = 0.2) == 1] <- NA
data$ph.ecog[rbinom(nrow(data), size = 1, prob = 0.2) == 1] <- NA
imp <- mice(data, print = FALSE)
fit <- with(imp, coxph(Surv(time, status) ~ age))
summary(pool(fit))
#> term estimate std.error statistic df p.value
#> 1 age 0.0200698 0.01067183 1.880633 38.41092 0.0676197 Created on 2024-11-21 with reprex v2.1.1 Can you try this code on your system? And, if that works, adapt it to your data? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #675
Originally posted by evielopoo October 10, 2024
This code has been running fine for months:
However, starting yesterday it was returning number of observations = total number of failures, not the total number of failures + censored events. Also, my object "coxfit1_pool" is of class mipa and produces an estimate, but when I use the command view(coxfit1_pool), RStudio returns "error: object not found". Any idea what is going on here? It doesn't seem to be an issue with the imputed dataset itself (if I extract m=1 imputed dataset, it returns the correct number of observations and has no missing values).
The text was updated successfully, but these errors were encountered: