rk.survey.design: Survey Analysis Tools for RKWard

Version License R Version

This package provides a suite of RKWard plugins that create a graphical user interface for the powerful survey R package. It is designed to simplify the workflow for complex survey analysis by providing dialogs for creating survey design objects and performing a wide range of common statistical analyses.

Features / Included Plugins

This package installs a new top-level menu in RKWard: Survey, which contains the following nine plugins:

Requirements

  1. A working installation of RKWard.

  2. The R package survey. If you do not have it, install it from the R console:

    install.packages("survey")
  3. The R package devtools is required for installation from the source code.

    install.packages("devtools")

Installation

To install the rk.survey.design plugin package, you need the source code (e.g., by downloading it from GitHub).

  1. Open RKWard.
  2. Run the following commands in the R console:
local({
## Preparar
require(devtools)
## Computar
  install_github(
    repo="AlfCano/rk.survey.design"
  )
## Imprimir el resultado
rk.header ("Resultados de Instalar desde git")
})
  1. Restart RKWard to ensure the new menu items appear correctly.

Usage Workflow Example

The intended workflow is to first create a design object and then use that object for analysis.

Step 1: Create the Survey Design Object

  1. Load a sample dataset from the survey package into your R workspace:

    library(survey)
    data(api)
  2. Navigate to Survey > Create Survey Design.

  3. In the RKWard dialog, drag the apiclus1 data frame from the workspace browser into the “Survey data (data.frame)” slot.

  4. The other slots will now be populated with the columns from apiclus1.

  5. In the “Save survey design object as” field, keep the default name survey.design.

  6. Click Submit.

A new object named survey.design of class svydesign will be created in your workspace.

Step 2: Perform a Grouped Analysis

  1. Navigate to Survey > Grouped Survey Analysis (by).
  2. In the RKWard dialog, the object browser on the left will now show the survey.design object.
  3. Drag survey.design into the “Survey design object” slot.
  4. The “Analysis variables” and “Grouping variables (by)” slots will now be populated with the columns from inside the survey object.
  5. For “Analysis variables”, select api00 and api99.
  6. For “Grouping variables (by)”, select stype.
  7. Ensure the “Function (FUN)” dropdown is set to “Mean”.
  8. Click Submit.

The RKWard output window will display a formatted table showing the mean api00 and api99 scores for each school type (E, H, M), correctly weighted according to the survey design.

Author

Alfonso Cano (alfonso.cano@correo.buap.mx) Assisted by Gemini, a large language model from Google.