I am trying to complete seemingly unrelated regressions (SUR) using the systemfit package in R. However, it is not straightforward to complete these analyses with multiply imputed data (with mice package).
Upon googling this question, I see that there was a deleted post about the identical question, which seems to have utilized the following example (credit to poster, minor edits)
library(systemfit)
library(mice)
nhanes2
r1 <- bmi ~ hyp
r2 <- bmi ~ age
system <- list( r1, r2 )
imp <- mice(nhanes2, m = 5)
m=5
completed=lapply(1:5,function(i)complete(imp,i))
fit.model <- systemfit(system, data= completed[[1]])
Above yields complete systemfit output for each imputed dataset. This is great but I am left with the task of pooling the entire output generated by SUR.
I have also unsuccessfully attempted running the function in zelig:
completed.mi=do.call(Zelig:mi,completed)
system=list(r1= bmi ~ hyp,r2=bmi~age)
z.out=zelig(formula= system,model="sur",data=completed.mi)
>Error: sur is not a supported model type.
Finally, calling the long form of the imputed data yields large degrees of freedom which does not reflect the actual number of cases in each imputed dataset (example not included)
My questions are:
1) Does the systemfit package support SUR for MI data?
2) If so, are you able to pool the output across all imputed datasets?
3) Are there alternative package options (other than systemfit) for completing SUR in R?
4) If 3 is a no, is there a similar analysis that will accomplish the same objectives and is there a different package(e.g., rms) that might support the pooling of MI data?
I don't think mice support pooling the results from SUR. You have to pool the results manually using Rubin's rules. I can go up to a certain point using your example, perhaps you can take it from there.
Calculating the pooled SE is more complex I used this post https://stats.stackexchange.com/questions/327237/calculating-pooled-p-values-manually
I have not looked into p values yet but should be easier now