Hello,
dealing with a rather small dataset with 180 cases, I have a question concerning imputing values for regular and passive variables.
The overall aim is to estimate the sum of all 180 cases of a final variable “Cases”.
- The final variable “Cases” is a passive variable and shall be computed via a formula including fixed parameters and two variables “Dis” and “Stay”.
- “Dis” and “Stay” themselves shall be imputed since they are missing 140 observations out of 180 cases.
- missings for “Dis” and “Stay” shall be imputed based on five variables with complete data for all 180 out of 180 cases
To this end, we imputed the two variables “Dis” and “Stay” with M = 5 imputations (M will be increased later) on the basis of five complete variables (180 observations out of 180 cases for the variables A, B, C, D and E):
With these two imputed variables, we now registered the passive variable “Cases” and estimated it’s sum using the commend “total”:
Now, here is our question:
We would like not only to provide the sum of the variable cases, but also an indicator of uncertainty (e.g. 95%CI) of the sum as introduced by multiple imputation.
Is this possible? If yes, how can this be computed?
We have already consulted the mi manual, various MI studies and searched online but could not find a good way how to approach this.
Any suggestions on how to address this issue are greatly appreciated!
Thank you very much in advance!
dealing with a rather small dataset with 180 cases, I have a question concerning imputing values for regular and passive variables.
The overall aim is to estimate the sum of all 180 cases of a final variable “Cases”.
- The final variable “Cases” is a passive variable and shall be computed via a formula including fixed parameters and two variables “Dis” and “Stay”.
- “Dis” and “Stay” themselves shall be imputed since they are missing 140 observations out of 180 cases.
- missings for “Dis” and “Stay” shall be imputed based on five variables with complete data for all 180 out of 180 cases
To this end, we imputed the two variables “Dis” and “Stay” with M = 5 imputations (M will be increased later) on the basis of five complete variables (180 observations out of 180 cases for the variables A, B, C, D and E):
Code:
* Load data use ${data}, clear * Register to be imputed variables mi register imputed Dis Stay * Set imputation style and M mi set wide mi set M = 5 * impute first incomplete variable (has been registered in prior step) mi impute pmm Dis A B C D E, rseed(1001) knn(10) replace * Impute second incomplete variable mi impute pmm Stay A B C D E, rseed(1002) knn(10) replace
Code:
* Generate passive variable mi passive: generate Cases = (Dis * 0.5 * (Stay + (1/0.5) - 1)) * Estimate Outcomes * 1. Estimate mean values of imputed variable mi estimate: mean Dis mi estimate: mean Stay * 2. Estimate across all observations sum of imputed variable "Cases" mi estimate: total Cases
Now, here is our question:
We would like not only to provide the sum of the variable cases, but also an indicator of uncertainty (e.g. 95%CI) of the sum as introduced by multiple imputation.
Is this possible? If yes, how can this be computed?
We have already consulted the mi manual, various MI studies and searched online but could not find a good way how to approach this.
Any suggestions on how to address this issue are greatly appreciated!
Thank you very much in advance!