skills/43-wentorai-research-plugins/skills/domains/social-science/social-research-methods/SKILL.md
Core methods for empirical social science research including surveys and expe...
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research social-research-methodsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
A comprehensive skill for designing and conducting empirical social science research. Covers survey methodology, experimental design, qualitative methods, and mixed-methods approaches used across sociology, political science, and psychology.
Research Question Type -> Recommended Design
"What is the prevalence of X?" -> Cross-sectional survey
"Does X cause Y?" -> Randomized experiment or quasi-experiment
"How does X develop over time?" -> Longitudinal panel study
"What does X mean to participants?" -> Qualitative (interviews, ethnography)
"How much of Y is explained by X?" -> Correlational / regression study
"Does the effect hold across contexts?" -> Comparative / cross-national study
def operationalize_construct(construct: str, dimensions: list[dict]) -> dict:
"""
Create an operationalization plan for a theoretical construct.
Args:
construct: Name of the abstract concept
dimensions: List of dicts with 'name', 'indicators', 'measurement_level'
"""
plan = {
'construct': construct,
'dimensions': [],
'total_items': 0
}
for dim in dimensions:
items = []
for indicator in dim['indicators']:
items.append({
'indicator': indicator,
'measurement': dim['measurement_level'],
'source': dim.get('data_source', 'self-report survey')
})
plan['dimensions'].append({
'name': dim['name'],
'items': items,
'n_items': len(items)
})
plan['total_items'] += len(items)
return plan
# Example: operationalize "social capital"
social_capital = operationalize_construct(
construct="Social Capital",
dimensions=[
{
'name': 'bonding_capital',
'indicators': ['close_friends_count', 'family_support_scale', 'trust_in_neighbors'],
'measurement_level': 'ordinal (Likert 1-5)'
},
{
'name': 'bridging_capital',
'indicators': ['diverse_network_size', 'weak_ties_count', 'civic_participation'],
'measurement_level': 'ratio'
}
]
)
| Method | Description | When to Use | |--------|------------|------------| | Simple random | Every unit has equal probability | Small, accessible populations | | Stratified | Divide into strata, sample within each | Need representation of subgroups | | Cluster | Sample groups, then individuals within | Geographically dispersed populations | | Quota | Non-probability; fill demographic quotas | Exploratory research, tight budgets | | Snowball | Participants recruit others | Hard-to-reach populations |
import math
def sample_size_proportion(p: float = 0.5, margin_error: float = 0.05,
confidence: float = 0.95, population: int = None) -> int:
"""
Calculate required sample size for estimating a proportion.
Args:
p: Expected proportion (use 0.5 for maximum variance)
margin_error: Desired margin of error
confidence: Confidence level
population: Finite population size (optional)
"""
z_scores = {0.90: 1.645, 0.95: 1.96, 0.99: 2.576}
z = z_scores.get(confidence, 1.96)
n = (z**2 * p * (1 - p)) / margin_error**2
# Finite population correction
if population:
n = n / (1 + (n - 1) / population)
return math.ceil(n)
print(sample_size_proportion(p=0.5, margin_error=0.03, confidence=0.95))
# Result: 1068
Between-subjects:
+ No carryover effects
+ Simpler analysis
- Requires more participants
- Individual differences add noise
Within-subjects:
+ More statistical power
+ Fewer participants needed
- Carryover/order effects
- Demand characteristics
Solution: Counterbalance condition order (Latin square)
Always use computer-generated random assignment. Block randomization ensures balanced groups. Include manipulation checks to verify that the independent variable was perceived as intended.
# Standard analysis pipeline for survey data
import pandas as pd
from scipy import stats
def analyze_survey(df: pd.DataFrame, iv: str, dv: str,
covariates: list[str] = None) -> dict:
"""Run standard analytical checks on survey data."""
results = {}
# 1. Descriptive statistics
results['descriptives'] = df[[iv, dv]].describe().to_dict()
# 2. Reliability (if scale items provided)
# Compute Cronbach's alpha for multi-item scales
# 3. Bivariate test
if df[iv].nunique() == 2:
groups = [group[dv].dropna() for _, group in df.groupby(iv)]
t_stat, p_val = stats.ttest_ind(*groups)
d = (groups[0].mean() - groups[1].mean()) / df[dv].std() # Cohen's d
results['test'] = {'type': 't-test', 't': t_stat, 'p': p_val, 'cohens_d': d}
else:
# Correlation for continuous IV
r, p = stats.pearsonr(df[iv].dropna(), df[dv].dropna())
results['test'] = {'type': 'correlation', 'r': r, 'p': p}
return results
All social science research with human participants requires Institutional Review Board (IRB) or Ethics Committee approval. Obtain informed consent, ensure confidentiality, minimize harm, and provide debriefing for deception studies. Follow APA or ASA ethical guidelines as applicable to your discipline.
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.