reprho | R Documentation |
Estimates correlation coefficients using replicate weights.
For a detailed explanation on how the standard errors are estimated
see repse
.
reprho(
x = NULL,
pv = NULL,
pv2 = NULL,
relatedpvs = TRUE,
setup = NULL,
repwt,
wt,
df,
rho = c("pearson", "spearman", "polychoric"),
method = c("TIMSS", "PIRLS", "ICILS", "ICCS", "PISA", "TALIS"),
group = NULL,
exclude = NULL
)
x |
a string vector specifying variable names (within |
pv |
a string vector indicating the variable names for all plausible values
of a construct. If not |
pv2 |
a string vector indicating the variable names for all plausible values
of a second construct (distinct from |
relatedpvs |
a logical value indicating 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 in |
df |
a data frame. |
rho |
a string indicating the correlation coefficient to be computed:
|
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 data frame.
# 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 ----
# Non PVs
reprho(x = c("GENDER",paste0("Math",1:3)),
pv = NULL,
pv2 = NULL,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
method = "ICILS")
# X var and PVs
reprho(x = c("GENDER",paste0("Math",1:3)),
pv = paste0("Reading",1:5),
pv2 = NULL,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
method = "ICILS")
# PVs and PVs (related)
reprho(x = NULL,
pv = paste0("Math",1:5),
pv2 = paste0("Reading",1:5),
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
method = "ICILS")
# PVs and PVs (UNrelated)
reprho(x = NULL,
pv = paste0("Math",1:5),
pv2 = paste0("Reading",1:5),
relatedpvs = FALSE,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
method = "ICILS")
### Groups ----
# Non PVs
reprho(x = c("GENDER",paste0("Math",1:3)),
pv = NULL,
pv2 = NULL,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
group = "GROUP",
method = "ICILS")
# X var and PVs
reprho(x = c("GENDER",paste0("Math",1:3)),
pv = paste0("Reading",1:5),
pv2 = NULL,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
group = "GROUP",
method = "ICILS")
# PVs and PVs (related)
reprho(x = NULL,
pv = paste0("Math",1:5),
pv2 = paste0("Reading",1:5),
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
group = "GROUP",
method = "ICILS")
# PVs and PVs (UNrelated)
reprho(x = NULL,
pv = paste0("Math",1:5),
pv2 = paste0("Reading",1:5),
relatedpvs = FALSE,
rho = "pearson",
repwt = RW,
wt = "wt",
df = repdata,
group = "GROUP",
method = "ICILS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.