The majority of ILSAstats functions will need us to
provide information about which data we are using (df),
what are the total weights (wt), what are the replicate
weights (repwt), which jackknife method is used
(method), how to group the results (group),
and which groups should be excluded from pooled and composite aggregates
(exclude).
Since this is a lot of information, and most probably we will use it
several times, we can allocate all of it within a single object of class
"repsetup".
For creating the setup we will need both the replicate weights, and
the data. So, using the included timss99 data and
repsetup(), we would:
Then, we would need to specify:
ST1 <- repsetup(repwt = RW2,
wt = "TOTWGT",
df = timss99,
method = "oldTIMSS",
group = "IDCNTRY_STR")We can print ST1 to check what information it holds:
## repsetup:
## data = timss99: 16 columns, and 3000 rows.
## total weights = "TOTWGT".
## replicate weights = 75 weights.
## method = "oldTIMSS".
## groups = "IDCNTRY_STR".
## excluded groups = NULL.
As we did for the automatic creation of weights in RW2,
we can also create automatically the setup using
repsetupILSA():
And, as we can see, we would obtain the same result as
ST1:
## [1] TRUE