repprop | R Documentation |
Estimates proportions using replicate weights
for a variable or a group of plausible values variables and for one or more
populations.
For a detailed explanation on how the standard errors are estimated
see repse
.
repprop(
x,
categories = NULL,
setup = NULL,
repwt,
wt,
df,
method = c("TIMSS", "PIRLS", "ICILS", "ICCS", "PISA", "TALIS"),
group = NULL,
exclude = NULL
)
x |
a string vector specifying variable names (within |
categories |
a vector indicating all possible response categories.
If |
setup |
an optional list produced by |
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.
# 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 ----
# One variable - weights within df
repprop(x = c("item01"),
repwt = "REPWT", wt = "wt", df = cbind(repdata,RW),
method = "ICILS")
# One variable - weights weights as a separate data frame
repprop(x = c("item01"),
repwt = RW, wt = "wt", df = repdata,
method = "ICILS")
# Multiple variables - PVs are assumed
repprop(x = c("CatMath1","CatMath2","CatMath3"),
repwt = RW, wt = "wt", df = repdata,
method = "ICILS")
### Groups ----
# One variable - weights within df
repprop(x = c("item01"),
group = "GROUP",
repwt = "REPWT", wt = "wt", df = cbind(repdata,RW),
method = "ICILS")
# One variable - weights weights as a separate data frame
repprop(x = c("item01"),
group = "GROUP",
repwt = RW, wt = "wt", df = repdata,
method = "ICILS")
# Multiple variables - PVs are assumed
repprop(x = c("CatMath1","CatMath2","CatMath3"),
group = "GROUP",
repwt = RW, wt = "wt", df = repdata,
method = "ICILS")
# Multiple variables - excluding one group
repprop(x = c("CatMath1","CatMath2","CatMath3"),
group = "GROUP",
exclude = "GR2",
repwt = RW, wt = "wt", df = repdata,
method = "ICILS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.