repprop.table: Tables for Proportions with Replicate Weights

View source: R/repprop.table.R

repprop.tableR Documentation

Tables for Proportions with Replicate Weights

Description

Creates tables for proportions using replicate weights for a variable or a group of plausible values variables and for one or more populations.

Usage

repprop.table(x, type = c("long", "wide1", "wide2"), separateSE = TRUE)

Arguments

x

a list produced by repprop.

type

a character value indicating the type of table to produce. Options include: "long", for a long table with a column with the proportions and another one for the standard error; "wide1" for a wide table where groups are distributed in lines; "wide2" for a wide table where groups are distributed in columns.

separateSE

a logical value indicating if standard errors should be separated from proportions, each as an element from a list. Only works for wide tables. Default is TRUE.

Value

a adata frame or a list.

Examples

# 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




x = repprop(x = c("item01"),
            group = "GROUP",
            repwt = "REPWT", wt = "wt", df = cbind(repdata,RW),
            method = "ICILS")

repprop.table(x, type = "long")


repprop.table(x, type = "wide1", separateSE = TRUE)


repprop.table(x, type = "wide1", separateSE = FALSE)


repprop.table(x, type = "wide2", separateSE = TRUE)


repprop.table(x, type = "wide2", separateSE = FALSE)

ILSAstats documentation built on March 13, 2026, 5:07 p.m.