repsetup | R Documentation |
Creates a list with common arguments used for analysis with replicate weights.
repsetup(
repwt,
wt,
df,
method = c("TIMSS", "PIRLS", "ICILS", "ICCS", "PISA", "TALIS"),
group = NULL,
exclude = NULL
)
repwt |
a string indicating the common names for the replicate weights
columns (within |
wt |
a string specifying the name of the column (within |
df |
a data frame. |
method |
a string indicating the name of the large-scale assessment
to determine the replication method to use. Available options are:
|
group |
a string specifying the variable name (within |
exclude |
a vector indicating which groups
(in the same format as |
a list to be used in other functions.
# Creation of replicate weights
RW <- repcreate(df = repdata, # the data frame with all the information
wt = "wt", # the total weights column name
jkzone = "jkzones", # the jkzones column name
jkrep = "jkrep", # the jkreps column name
repwtname = "REPWT", # the desired name for the rep weights
reps = 50, # the number of replications
method = "ICILS") # the name of the method aka the study name
### No groups ----
stp1 <- repsetup(repwt = RW, wt = "wt", df = repdata, method = "ICILS")
stp1
### Groups ----
stp2 <- repsetup(repwt = RW, wt = "wt", df = repdata, method = "ICILS",
group = "GROUP", exclude = "GR2")
stp2
### repmean ----
repmean(x = "Math1",setup = stp1)
repmean(x = "Math1",setup = stp2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.