survey-analysis

Perform survey-weighted analysis in R using the survey package.

37|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/letitbk/claude-academic-setup --skill survey-analysis-letitbk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: survey-analysis
Source: https://github.com/letitbk/claude-academic-setup/tree/main/skills/survey-analysis
Command: npx skills add https://github.com/letitbk/claude-academic-setup --skill survey-analysis-letitbk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires survey, svrepdesign, marginaleffects, anesrake, and includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of conducting design-based survey analysis in R by providing ready-to-use code snippets, best practices, and workflows for survey setup, weighting, and regression analysis.

Core Features & Use Cases

  • Survey Design Setup: Provides methods to define complex survey designs including stratification, clustering, and weights. Example: setting up a design for NHIS data.
  • Weighted Descriptives & Regression: Enables calculation of weighted means, totals, and regression models such as svyglm, facilitating accurate statistical inference.
  • Use Case: A researcher analyzing national survey data can apply this Skill to perform weighted regressions, generate descriptive statistics, and conduct significance tests accurately using R.

Quick Start

Use the survey analysis skill to perform a weighted linear regression on your survey dataset to assess the relationship between income and education level.

Frequently Asked Questions about survey-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a complex survey design in R for weighted analysis?

Complex survey design setup in R requires defining stratification, clustering, and weights using the survey package. You can configure designs for datasets like NHIS by specifying these structural elements to ensure accurate statistical inference.

Can I perform weighted regression using svyglm for national health survey data?

Weighted regression for national health survey data is performed using svyglm from the survey package. This function enables accurate model fitting and significance testing by applying survey weights to your dataset.

What's the best way to calculate weighted means and totals for social science survey data?

Calculating weighted means and totals for social science survey data is best done through the survey package in R. It provides specialized functions to generate accurate descriptive statistics from complex survey designs.

How do I apply calibration and weighting techniques like anesrake to public health survey data?

Calibration and weighting techniques for public health survey data are applied using the anesrake package. This process adjusts sample weights to match population totals, ensuring your survey analysis yields representative results.

Does the survey package support marginaleffects for post-regression analysis in R?

The survey package supports marginaleffects for post-regression analysis in R. This integration allows you to compute marginal effects and predicted values from svyglm models while preserving the complex survey design structure.