FimIMI: FimIMI: Multiple Runs of Improved Multiple Imputation (IMI)

View source: R/FimIMI.R

FimIMIR Documentation

FimIMI: Multiple Runs of Improved Multiple Imputation (IMI)

Description

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.

Usage

FimIMI(d, R, n, M, batch = 0)

Arguments

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.

Details

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.

Value

A list containing:

R

Vector of run numbers.

Beta

Matrix of regression coefficients for each run.

comm

Vector of indicator variables for each run.

Examples

# 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


DLMRMV documentation built on April 12, 2025, 1:25 a.m.

Related to FimIMI in DLMRMV...