FimIMI | R Documentation |
This function performs multiple runs of the Improved Multiple Imputation (IMI) estimation and collects the results. It is designed to facilitate batch processing and repeated runs of IMI.
FimIMI(d, R, n, M, batch = 0)
d |
The data structure. |
R |
Number of runs to perform. |
n |
Vector of sample sizes for each group. |
M |
Number of multiple imputations per run. |
batch |
Batch number (default is 0). This can be used to distinguish different batches of runs. |
This function assumes that the data structure d
is properly defined and contains the necessary information.
The function repeatedly calls the IMI
function and collects the regression coefficients and indicator variables.
A list containing:
R |
Vector of run numbers. |
Beta |
Matrix of regression coefficients for each run. |
comm |
Vector of indicator variables for each run. |
# Example data
set.seed(123)
n <- c(300, 300, 400) # Sample sizes for each group
p <- 5 # Number of independent variables
d <- list(p = p, Y = rnorm(sum(n)), X0 = matrix(rnorm(sum(n) * p), ncol = p))
# Call FimIMI function
result <- FimIMI(d = d, R = 10, n = n, M = 20, batch = 1)
# View results
print(result$Beta) # Regression coefficients for each run
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.