Can survey package deal with multiple imputation + replicate weights?

Hi, I am learning how to use the survey package. I have 3 dataframes.
1st = my data,
2nd = multiple imputations for two variables that some people didnt awnser in my data (1st)
3st = replicate weights.

Is there an easy way to use the 3 of them to specify the design of my survey?
For example, I know if I want to specify the design of my survey with my data and the replicate weights I can use something like this:

my_object <- svrepdesign(data=my_data, 
                         type="bootstrap", 
                         weight=~weight, 
                         repweights= mi_replicate_weights, 
                         replicates=10)
 

Is there a way to add the multiple imputation values too? I want to do this to do some linear regression later with svyglm()

Here is an example of my data.
In my data dataframe the variables i0900 and i0700 have multiple imputations with 5 different values each in the dataframe my_multiple_imputation


my_data <- data.frame(
  ID = 1:10,
  var1 = c(12, 10, 10, 10, 10, 1, 2, 1, 11, 1),
  var2 = c(0, 0, 1, 0, 0, 0, 1, 1, 1, 1),
  var3 = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1),
  i0900 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
  i0700 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
  weights = c(5446.342, 6316.523, 6204.821, 4990.569, 6204.776, 6668.560, 5412.874, 5258.125, 5003.503, 6375.033)
)


my_multiple_imputation <- data.frame(
    ID = 1:10,
    i0900_1 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
    i0900_2 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
    i0900_3 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
    i0900_4 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
    i0900_5 = c(-98, 80, -98, -98, -98, 80, 80, -98, -98, -98),
    fi0900 = c(-98, 0, -98, -98, -98, 0, 0, -98, -98, -98),
    i0700_1 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
    i0700_2 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
    i0700_3 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
    i0700_4 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
    i0700_5 = c(-98, 400, -98, -98, -98, 500, 600, -98, -98, -98),
    fi0700 = c(-98, 0, -98, -98, -98, 0, 0, -98, -98, -98)
  )
  
  my_replicate_weights <- data.frame(
    ID = 1:10,
    FACTOR_1 = c(3470.649, 12878.827, 0.000, 10655.126, 0.000, 4138.237, 0.000, 0.000, 7214.546, 0.000),
    FACTOR_2 = c(0.000, 0.000, 3683.312, 5723.668, 10735.168, 2096.770, 0.000, 0.000, 5000.387, 0.000),
    FACTOR_3 = c(3537.022, 0.000, 2078.225, 4735.916, 7009.782, 4643.503, 3944.539, 1133.992, 0.000, 1747.900),
    FACTOR_4 = c(0.0000, 6484.5566, 0.0000, 4730.6363, 11201.9237, 2064.7484, 0.0000, 1135.5092, 2764.1421, 779.7188),
    FACTOR_5 = c(2511.3656, 6833.1164, 1616.3034, 0.0000, 8525.0265, 1904.0142, 5855.8101, 618.2238, 3046.1584, 1783.1741)
  )
  

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.