Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Core methods for empirical social science research including surveys and expe...
.claude/skills/brycewang-stanford-social-research-methods/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-15 | ✓→✓ | = Same ✓ | 61% | 0% |
| case-13 | ✓→✓ | = Same ✓ | 21% | 0% |
| case-02 | ✓→✓ | = Same ✓ | 61% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 98% | 0% |
| case-08 | ✓→✓ | = Same ✓ | 53% | 0% |
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 studypythondef 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 |
pythonimport 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.
python# 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.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-15 | pass→pass | 14,560 | 13,290 | -9% | 1 | 1 | 0% | 2,300 | 3,707 | +61% | 0 | 0 | — |
case-13 | pass→pass | 16,380 | 12,019 | -27% | 1 | 1 | 0% | 3,174 | 3,851 | +21% | 0 | 0 | — |
case-14 | fail→fail | 10,814 | 13,777 | +27% | 1 | 1 | 0% | 1,728 | 3,730 | +116% | 0 | 0 | — |
case-01 | fail→fail | 17,532 | 18,759 | +7% | 1 | 1 | 0% | 3,115 | 4,188 | +34% | 0 | 0 | — |
case-02 | pass→pass | 14,805 | 9,693 | -35% | 1 | 1 | 0% | 1,926 | 3,104 | +61% | 0 | 0 | — |
case-03 | pass→pass | 10,918 | 11,274 | +3% | 1 | 1 | 0% | 1,732 | 3,435 | +98% | 0 | 0 | — |
case-08 | pass→pass | 14,963 | 12,892 | -14% | 1 | 1 | 0% | 2,383 | 3,643 | +53% | 0 | 0 | — |
case-04 | pass→pass | 12,130 | 13,914 | +15% | 1 | 1 | 0% | 1,887 | 3,772 | +100% | 0 | 0 | — |
case-05 | pass→pass | 11,420 | 9,402 | -18% | 1 | 1 | 0% | 1,628 | 3,028 | +86% | 0 | 0 | — |
case-06 | pass→pass | 7,349 | 11,331 | +54% | 1 | 1 | 0% | 1,223 | 3,420 | +180% | 0 | 0 | — |
case-07 | pass→pass | 13,645 | 13,351 | -2% | 1 | 1 | 0% | 1,986 | 3,601 | +81% | 0 | 0 | — |
case-09 | pass→pass | 11,913 | 12,494 | +5% | 1 | 1 | 0% | 1,869 | 3,359 | +80% | 0 | 0 | — |
case-10 | pass→pass | 14,617 | 13,132 | -10% | 1 | 1 | 0% | 2,144 | 3,433 | +60% | 0 | 0 | — |
case-11 | pass→pass | 7,382 | 8,760 | +19% | 1 | 1 | 0% | 896 | 2,945 | +229% | 0 | 0 | — |
case-12 | pass→pass | 8,104 | 8,881 | +10% | 1 | 1 | 0% | 1,023 | 3,017 | +195% | 0 | 0 | — |
case-16 | pass→pass | 20,558 | 15,399 | -25% | 1 | 1 | 0% | 4,284 | 4,586 | +7% | 0 | 0 | — |
case-17 | pass→pass | 7,318 | 7,977 | +9% | 1 | 1 | 0% | 940 | 2,642 | +181% | 0 | 0 | — |
case-18 | pass→pass | 7,331 | 9,953 | +36% | 1 | 1 | 0% | 985 | 3,390 | +244% | 0 | 0 | — |
case-19 | pass→pass | 16,804 | 16,641 | -1% | 1 | 1 | 0% | 2,556 | 4,044 | +58% | 0 | 0 | — |
case-20 | pass→pass | 10,676 | 7,958 | -25% | 1 | 1 | 0% | 1,692 | 2,949 | +74% | 0 | 0 | — |
case-21 | pass→pass | 6,655 | 7,023 | +6% | 1 | 1 | 0% | 934 | 2,647 | +183% | 0 | 0 | — |
case-22 | pass→pass | 16,086 | 15,741 | -2% | 1 | 1 | 0% | 2,674 | 4,199 | +57% | 0 | 0 | — |
case-23 | pass→pass | 7,589 | 13,039 | +72% | 1 | 1 | 0% | 1,423 | 3,866 | +172% | 0 | 0 | — |
case-24 | pass→pass | 32,136 | 42,718 | +33% | 1 | 1 | 0% | 5,396 | 8,406 | +56% | 0 | 0 | — |
case-25 | pass→pass | 10,625 | 7,824 | -26% | 1 | 1 | 0% | 1,736 | 2,834 | +63% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of 0 percentage points is the difference between those two pass rates over the 25 comparable cases.
Other measured skills in the registry, with their headline benchmark lift.