{"slug": "cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min", "title": "Cursor vs Copilot Adopters: Odds Ratios in 12 Steps, 75 Min", "summary": "Stack Overflow's 2026 Developer Survey, published October 6, 2026, reports Cursor at 25.5% and GitHub Copilot at 58.7% among coding agents and assistants used in the past year, while an independent count by Stackness of the public survey files puts Copilot at 61.3% and Claude Code at 68.4% among the 11,739 respondents who answered the coding-agent question. The two Copilot figures from the same survey year differ by 2.6 points, a gap neither page explains, and the survey's valid responses fell to 30,903 in 2026 from 49,009 in 2025. The analysis argues that differing denominators, question wording, a shrinking self-selected sample and population drift drive the disagreement, and proposes fitting one logistic regression per tool on the same respondents to read odds ratios and bootstrap the Cursor-minus-Copilot gap.", "body_md": "Two Stack Overflow figures describe Cursor and GitHub Copilot, and they do not measure the same thing. The 2025 results put Cursor at 17.9% of all respondents on the technology page, while Copilot reached about 68% among people who use out-of-the-box AI assistants, as [Stack Overflow’s own look back at the 2025 findings](https://stackoverflow.blog/2026/09/30/getting-ready-for-2026-results-a-look-back-on-developer-survey-findings) recounts. Line those two numbers up and Copilot appears to win by a mile. Compare them on a shared base and the picture can change a lot, but the headline figures alone cannot tell you by how much.\n\nThe question got more pressing on October 6, 2026, when Stack Overflow [published its 2026 Developer Survey](https://stackoverflow.co/company/press/archive/stack-overflow-annual-developer-survey-ai-trust-conditional). Its AI data page reports Cursor at 25.5% and GitHub Copilot at 58.7% among coding agents and assistants used in the past year. An independent count from [Stackness on the public survey files](https://stackness.dev/blog/stack-overflow-developer-survey-2026-tool-changes-year-over-year) reports Copilot at 61.3% and Claude Code at 68.4% among the 11,739 people who answered the coding-agent question. Two Copilot figures from the same survey year differ by 2.6 points, and neither page explains the gap.\n\nA single share per tool is a headline. The better question is who adopts each tool: freelancers or enterprise staff, juniors or veterans, web developers or data people. That is a regression problem, and about 380 lines of Python can answer it. Where earlier work on this site covered [margin of error with Wilson intervals](https://shattered.io/cursor-vs-copilot-margin-of-error-wilson-interval-12-steps-2026/) and built a [share-claim linter](https://shattered.io/cursor-vs-copilot-share-claim-linter-python-12-steps-2026/), the project below goes one level deeper. It fits one logistic regression per tool on the same respondents, reads the odds ratios, tests the Cursor-minus-Copilot gap with a bootstrap, and converts everything to percentage points a manager can read.\n\nDon't miss new tech stories on Google\n\nAdd Shattered once in the Google app and our stories show up in your news suggestions.\n\n[Add now](https://www.google.com/preferences/source?hl=en&q=https%3A%2F%2Fshattered.io%2F)\n\n## Why Cursor vs Copilot Share Numbers Disagree\n\nFour mechanics produce most of the disagreement, and each one shows up in the survey files if you look for it.\n\nThe first is the denominator. A share is a count divided by a base, and the base changes with the question. Cursor sits in the development-environment list in the 2025 data. Copilot sits in an AI-tool list that only some respondents see. Divide each by its own base and you compare two different crowds. In the 2026 files, Stackness counts 13,120 people who answered the editor question and 11,739 who answered the coding-agent question, out of 30,903 valid responses. Those bases differ by 1,381 people before you even ask who they are.\n\nThe second is wording. An editor you tick as used is not the same claim as an assistant you used in the past year. A developer can have Cursor installed, never open it, and still tick the box. The same developer can pay for Copilot through an employer and tick it without choosing it. The third is the sample itself. Stackness reports 30,903 valid responses in 2026 against 49,009 in 2025, and 65.5% of the 14,347 people who answered the closing length question called the survey too long. A shrinking, self-selected sample moves shares even when nothing changes in the real world.\n\nThe fourth is population drift inside the sample. If the 2026 respondents skew toward people who enjoy long surveys, they may skew toward early adopters. The [survey selection bias tipping point](https://shattered.io/cursor-vs-copilot-survey-selection-bias-tipping-point-12-steps-2026/) on this site shows how large that skew must be to flip a conclusion. Regression does not fix selection, but it does show whether a tool’s popularity concentrates in one corner of the sample, which tells you how nervous to be.\n\nThe table below comes from the synthetic file the project generates in Step 3, so every number is planted by design and none describes real developers. It shows why base choice matters even in a toy case.\n\n| Measure (synthetic file) | Cursor | GitHub Copilot | \n|---|---|---|\n| Share on own denominator | 17.9% | 49.9% | \n| Share on common base (answered both questions) | 17.4% (base 4,998) | Not listed | \n| Shift from switching base | -0.5 points | +0.3 points | \n\nThe shifts look small here because the fixture drops answers at random. Real surveys gate questions by earlier answers, so the shift can be far larger. The point of the tutorial is to make the base explicit and to let the data show what a different base does.\n\n## Prerequisites and Versions\n\nThe project runs on a laptop and needs no GPU or account. It does need a recent Python and four libraries. Here is the exact stack the examples ran on, plus the minimum versions the code relies on.\n\n- **Python:** 3.12 or newer (the output below came from 3.12.3). The code uses`str | None` type syntax and built-in generics, so 3.10 is the practical floor.\n- **pandas:** 2.2 or newer (run on 3.1.1). The code avoids`object` dtype assumptions so it works with the newer string dtype.\n- **NumPy:** a recent release (run on 2.5.5).\n- **statsmodels:** a recent release for`Logit` and`get_margeff` .\n- **SciPy:** a recent release, which statsmodels needs.\n- **pytest:** 8.0 or newer for the test suite.\n- **Disk and memory:** about 1 GB free disk and 2 GB of free RAM. The public survey CSV loads in well under that.\n- **Time:** 70 to 75 minutes end to end, including the download.\n\nYou also need working comfort with pandas `groupby`, a rough idea of what a logistic regression predicts, and a shell. If odds ratios are new to you, Step 8 explains them with the synthetic output, and the section on reading results later in the article restates the rule in one sentence.\n\nOne scope note before the build. The survey measures what respondents say they use, not what the vendors ship or sell. Cursor’s pricing and Copilot’s billing both changed in 2026, and the tools gained newer models, so a survey answer from an earlier period describes an earlier product. The [market share audit](https://shattered.io/cursor-vs-github-copilot-market-share-audit-12-steps-2026/) on this site covers how to word a share claim so it survives that gap. This project assumes you have already decided which survey year you are analyzing, and it works the same way on the 2025 and 2026 files.\n\n## Phase 1: Project Setup and Data (Steps 1 to 3)\n\nThe first phase gets an isolated environment, the real survey files, and a synthetic fixture you can test against without touching real data.\n\n### Step 1: Create the project and install dependencies\n\nMake a folder, a virtual environment, and a requirements file. Keeping the environment local to the project means the statsmodels version you test with is the one you ship with.\n\n```\nmkdir adopter-odds && cd adopter-odds\npython3 -m venv .venv\nsource .venv/bin/activate        # Windows: .venv\\Scripts\\activate\nmkdir adopter_odds tests data out\n```\n\nSave this as `requirements.txt` in the project root.\n\n```\npandas>=2.2\nnumpy>=1.26\nstatsmodels>=0.14\nscipy>=1.11\npytest>=8.0\npython\npip install -r requirements.txt\npython -c \"import pandas, statsmodels; print(pandas.__version__, statsmodels.__version__)\"\n```\n\nThe last line should print two version numbers. On the machine used for this article it printed the following.\n\n```\n3.1.1 0.15.0\n```\n\nIf the import fails, the virtual environment is not active. Check that your prompt shows `(.venv)` and rerun the install.\n\n### Step 2: Get the survey files and check the license\n\nStack Overflow hosts each year’s results on `survey.stackoverflow.co` with a download link for the anonymized CSV. Download the file for the year you want, unzip it, and put the main responses file in `data/` as `survey_results_public.csv`. The data is released under the Open Database License, so keep the attribution in any report you publish. The download also includes a schema file that maps column names to the question text. Read the question text for every column you plan to use. It is the cheapest way to avoid the denominator mistake described above, and the [pandas walkthrough of the Stack Overflow survey](https://shattered.io/cursor-vs-copilot-stack-overflow-survey-pandas-12-steps-2026/) on this site shows a lighter first pass over the same files if you want a warm-up.\n\nOpen the CSV header once and note three things: how the age, organization size and experience columns are labeled, which columns mention AI tools, and which one lists development environments. The fixture in Step 3 uses the names `Age`, `OrgSize`, `WorkExp` and `DevType`, which mirror older public files, so compare them with your header and edit the candidate lists at the top of `features.py` if they differ. The exact 2026 headers could not be confirmed while writing this, which is why Step 4 discovers the tool columns by scanning cell contents instead of trusting a hardcoded name.\n\n### Step 3: Generate a synthetic fixture with planted effects\n\nReal data cannot tell you whether your code is right, because you do not know the true answer. A synthetic file can. The generator below plants known effects, so a correct pipeline must recover them. It also reproduces the structural trap from the real surveys: Cursor lives in an editor question and Copilot lives in an AI-agent question that fewer people answer.\n\n```\n\"\"\"Write a SYNTHETIC survey file with planted effects. Not real survey data.\"\"\"\nimport numpy as np\nimport pandas as pd\n\nrng = np.random.default_rng(2026)\nN = 8000\nages = [\"18-24 years old\", \"25-34 years old\", \"35-44 years old\", \"45-54 years old\", \"55+ years old\"]\nage = rng.choice(ages, N, p=[0.14, 0.38, 0.28, 0.14, 0.06])\norgs = [\"Just me - I am a freelancer\", \"2 to 9 employees\", \"20 to 99 employees\", \"1,000 to 4,999 employees\", \"10,000 or more employees\"]\norg = rng.choice(orgs, N, p=[0.10, 0.12, 0.25, 0.25, 0.28])\nexp = np.clip(rng.gamma(2.2, 4.2, N).round(), 0, 50)\nroles = rng.choice([\"Developer, full-stack\", \"Developer, back-end\", \"Data scientist\", \"DevOps specialist\", \"Developer, front-end\"], N, p=[0.35, 0.25, 0.12, 0.12, 0.16])\n\nz_cur = (-1.55 + 0.55 * (age == \"18-24 years old\") + 0.35 * (age == \"25-34 years old\")\n         - 0.45 * (age == \"55+ years old\") + 0.55 * (org == \"2 to 9 employees\")\n         + 0.40 * (org == \"Just me - I am a freelancer\") - 0.60 * (org == \"10,000 or more employees\")\n         - 0.03 * exp + 0.30 * (roles == \"Developer, front-end\"))\nz_cop = (-0.35 - 0.20 * (age == \"18-24 years old\") + 0.10 * (age == \"45-54 years old\")\n         - 0.45 * (org == \"2 to 9 employees\") + 0.70 * (org == \"10,000 or more employees\")\n         + 0.35 * (org == \"1,000 to 4,999 employees\") + 0.01 * exp\n         + 0.25 * (roles == \"DevOps specialist\"))\nuse_cur = rng.random(N) < 1 / (1 + np.exp(-z_cur))\nuse_cop = rng.random(N) < 1 / (1 + np.exp(-z_cop))\n\neditors = np.where(use_cur, \"Visual Studio Code;Cursor\", \"Visual Studio Code\")\nagents_answer = rng.random(N) < 0.68\nagents = np.where(use_cop, \"GitHub Copilot;ChatGPT\", \"ChatGPT\")\ndf = pd.DataFrame({\n    \"Age\": age, \"OrgSize\": org, \"WorkExp\": exp, \"DevType\": roles,\n    \"DevEnvs\": np.where(rng.random(N) < 0.92, editors, None),\n    \"AIAgents\": np.where(agents_answer, agents, None),\n})\ndf.to_csv(\"data/synthetic_survey.csv\", index=False)\nprint(f\"wrote data/synthetic_survey.csv with {len(df):,} rows\")\n```\n\nRun it from the project root.\n\n```\npython make_fixture.py\nwrote data/synthetic_survey.csv with 8,000 rows\n```\n\nThe planted truth is simple. Cursor adoption rises for young people, freelancers and tiny companies, and falls for people at 10,000-plus-employee firms and for the most experienced. Copilot adoption runs the other way, with a strong lift at the largest companies. Every number in the output sections that follow comes from this file, so treat them as a test of the method and not as a finding about developers.\n\n## Phase 2: Finding the Right Columns (Steps 4 and 5)\n\nPhase 2 is where most real analyses go wrong. It decides which respondents count as adopters and which count as not asked.\n\n### Step 4: Discover the Cursor and Copilot columns\n\nHardcoding a column name breaks the moment the survey renames it. Scanning cell contents survives renames. The module splits multi-select cells on semicolons and compares whole tokens, so a respondent who typed `Cursor Tab` in some free-text cell does not count as a Cursor user, and `Cursor` does not match inside a longer name.\n\n``` python\n\"\"\"Find which survey columns hold Cursor and Copilot answers.\"\"\"\nimport numpy as np\nimport pandas as pd\n\nALIASES = {\n    \"cursor\": {\"cursor\"},\n    \"copilot\": {\"github copilot\"},\n}\n\ndef tokens(series: pd.Series) -> pd.Series:\n    \"\"\"Split semicolon-separated multi-select cells into lowercase token lists.\"\"\"\n    return series.dropna().astype(str).str.lower().str.split(r\"\\s*;\\s*\", regex=True)\n\ndef has_token(series: pd.Series, aliases: set[str]) -> pd.Series:\n    \"\"\"True/False for answered cells, NaN where the cell is empty.\"\"\"\n    out = pd.Series(np.nan, index=series.index, dtype=\"float64\")\n    toks = tokens(series)\n    out.loc[toks.index] = toks.map(lambda t: float(bool(aliases & set(t))))\n    return out\n\ndef find_tool_columns(df: pd.DataFrame, tool: str, min_hits: int = 20) -> dict[str, int]:\n    \"\"\"Return {column: respondents listing the tool}, most hits first.\"\"\"\n    aliases = ALIASES[tool]\n    hits = {}\n    for col in df.columns:\n        if not (pd.api.types.is_string_dtype(df[col]) or pd.api.types.is_object_dtype(df[col])):\n            continue\n        n = int(has_token(df[col], aliases).fillna(0).sum())\n```\n\nThe function `find_tool_columns` returns each candidate column with its hit count, sorted by hits. When a tool appears in several columns, such as an editor list and an agent list, you decide which question you are measuring. The CLI prints the candidates and picks the top one, and you can override it with `--cursor-cols` and `--copilot-cols`.\n\nRun the discovery on the fixture.\n\n``` python\npython - <<'EOF'\nimport pandas as pd\nfrom adopter_odds.columns import find_tool_columns\ndf = pd.read_csv(\"data/synthetic_survey.csv\")\nprint(find_tool_columns(df, \"cursor\"))\nprint(find_tool_columns(df, \"copilot\"))\nEOF\n{'DevEnvs': 1313}\n{'AIAgents': 2715}\n```\n\n### Step 5: Build respondent-level flags with honest denominators\n\nThe flag function is the most important function in the project. It returns three states: 1 if the respondent listed the tool, 0 if they answered at least one of the tool’s columns without listing it, and missing if they never saw the question. Treating blank as zero is the classic error. A person who skipped the AI-agent question did not say they avoid Copilot, they said nothing.\n\n```\n            hits[col] = n\n    return dict(sorted(hits.items(), key=lambda kv: -kv[1]))\n\ndef tool_flag(df: pd.DataFrame, columns: list[str], aliases: set[str]) -> pd.Series:\n    \"\"\"1 = listed the tool, 0 = answered a question but did not list it, NaN = never saw it.\"\"\"\n    per_col = pd.concat([has_token(df[c], aliases) for c in columns], axis=1)\n    answered = per_col.notna().any(axis=1)\n    used = per_col.fillna(0).max(axis=1)\n    return used.where(answered)\n```\n\nOnce you have both flags, intersect them. The common base is every respondent who answered both questions, and it is the only population on which a Cursor-versus-Copilot comparison means anything. The CLI prints the naive shares first and the common-base shares second, so you see what the base choice does to each number.\n\n```\n[naive shares: each tool on its own denominator]\ncursor    17.9%  (95% CI 17.0% to 18.8%)  k=1,313 base=7,337\ncopilot   49.9%  (95% CI 48.6% to 51.3%)  k=2,715 base=5,438\n\n[common base] 4,998 respondents answered both questions\n[common-base shares]\ncursor    17.4%  (95% CI 16.3% to 18.4%)  k=868 base=4,998\ncopilot   50.2%  (95% CI 48.8% to 51.6%)  k=2,509 base=4,998\n```\n\nThe common base keeps only the 4,998 respondents who answered both questions, so you give up part of your sample to get an honest comparison. On a survey where only a third of respondents see the AI-agent question, that price can be steep. The trade is worth it, because a smaller clean sample beats a larger muddled one, and the confidence intervals widen visibly to show the cost.\n\n## Phase 3: Features and the Design Matrix (Steps 6 and 7)\n\nRegression needs predictors. The goal here is a short list of segments that a reader can interpret, not a kitchen-sink model.\n\n### Step 6: Engineer segment features\n\nFour features cover the questions people actually ask: age band, organization size, years of professional experience, and a coarse role group. Each starts as messy survey text and ends as a clean category.\n\n``` python\n\"\"\"Turn raw survey columns into a small set of segment features.\"\"\"\nimport numpy as np\nimport pandas as pd\n\nAGE_COLS = [\"Age\"]\nORG_COLS = [\"OrgSize\"]\nEXP_COLS = [\"WorkExp\", \"YearsCodePro\"]\nROLE_COLS = [\"DevType\"]\n\ndef first_col(df: pd.DataFrame, candidates: list[str]) -> str | None:\n    return next((c for c in candidates if c in df.columns), None)\n\ndef to_years(series: pd.Series) -> pd.Series:\n    s = series.astype(str).str.strip()\n    s = s.replace({\"Less than 1 year\": \"0.5\", \"More than 50 years\": \"51\", \"nan\": np.nan})\n    return pd.to_numeric(s, errors=\"coerce\")\n\ndef exp_bucket(years: pd.Series) -> pd.Series:\n    bins = [-0.01, 2, 5, 10, 20, 100]\n    labels = [\"0-2 yrs\", \"3-5 yrs\", \"6-10 yrs\", \"11-20 yrs\", \"21+ yrs\"]\n    return pd.cut(years, bins=bins, labels=labels).astype(\"object\")\n\ndef role_group(series: pd.Series) -> pd.Series:\n    low = series.astype(str).str.lower()\n    out = pd.Series(\"other\", index=series.index, dtype=\"object\")\n    out[low.str.contains(\"front-end|full-stack|web\", regex=True)] = \"web\"\n    out[low.str.contains(\"data|machine learning|scientist\", regex=True)] = \"data_ml\"\n    out[series.isna()] = np.nan\n    return out\n\ndef lump_rare(series: pd.Series, min_n: int) -> pd.Series:\n    \"\"\"Merge levels with fewer than min_n rows into 'Other' so dummies stay estimable.\"\"\"\n    counts = series.value_counts()\n    rare = counts[counts < min_n].index\n    return series.where(~series.isin(rare), \"Other\")\n\ndef build_features(df: pd.DataFrame, min_n: int = 100) -> pd.DataFrame:\n    feats = {}\n    age = first_col(df, AGE_COLS)\n    org = first_col(df, ORG_COLS)\n    exp = first_col(df, EXP_COLS)\n    role = first_col(df, ROLE_COLS)\n    if age:\n        feats[\"age\"] = lump_rare(df[age].where(df[age].notna()), min_n)\n    if org:\n        feats[\"org\"] = lump_rare(df[org].where(df[org].notna()), min_n)\n    if exp:\n        feats[\"exp\"] = exp_bucket(to_years(df[exp]))\n    if role:\n        feats[\"role\"] = role_group(df[role])\n    if not feats:\n        raise ValueError(\"None of Age, OrgSize, WorkExp/YearsCodePro, DevType found in the file\")\n    return pd.DataFrame(feats, index=df.index)\n```\n\nThree details deserve attention. The `to_years` helper converts the survey’s text answers, such as a label for under one year, into numbers before bucketing. The `role_group` helper reduces a multi-select job-title cell to three buckets with a transparent keyword rule, which you can audit in ten seconds. The `lump_rare` helper merges levels with fewer than `min_n` rows into an `Other` level, which prevents the perfect-separation failures covered in the troubleshooting section. If you plan to weight the sample by country or role mix, the [survey raking walkthrough](https://shattered.io/cursor-vs-copilot-survey-raking-reweight-python-12-steps-2026/) shows how to build those weights, and you can feed them into the model later as frequency weights.\n\n### Step 7: Build the design matrix and choose baselines\n\nLogistic regression needs numbers. The `design_matrix` function creates one 0/1 column per category level and drops the most common level of each feature as the baseline. Every odds ratio the model reports is relative to that baseline, so the baseline choice changes how the output reads.\n\n``` php\ndef design_matrix(feats: pd.DataFrame) -> pd.DataFrame:\n    \"\"\"One dummy per level, dropping the most common level of each feature as the baseline.\"\"\"\n    parts = []\n    for col in feats.columns:\n        s = feats[col]\n        base = s.value_counts().idxmax()\n        d = pd.get_dummies(s, prefix=col, prefix_sep=\"=\", dtype=float)\n        d = d.drop(columns=f\"{col}={base}\")\n        d.attrs[\"baseline\"] = base\n        parts.append(d)\n    X = pd.concat(parts, axis=1)\n    X.attrs[\"baselines\"] = {c: feats[c].value_counts().idxmax() for c in feats.columns}\n    return X\n```\n\nOn the fixture, the baselines come out as follows: age 25 to 34, organization size 10,000 or more employees, experience 6 to 10 years, and role web. The design has 14 dummy columns and 4,998 rows. A bigger company baseline matters for the Copilot results later, because Copilot’s planted lift sits at that exact baseline. An odds ratio below one for tiny companies on Copilot means they are less likely than the enterprise baseline, not that tiny companies reject the tool.\n\n## Phase 4: Logistic Regression and Odds Ratios (Steps 8 and 9)\n\nThe core of the project fits two models on identical rows and then asks whether their coefficients differ.\n\n### Step 8: Fit the logistic regressions and read odds ratios\n\nThe `fit_logit` function adds a constant, fits `statsmodels` `Logit`, and raises a readable error on perfect separation or non-convergence. The `odds_table` function exponentiates the coefficients and their confidence limits, which turns log-odds into odds ratios.\n\n```\n\"\"\"Logistic regressions, odds ratios, marginal effects and a bootstrap difference test.\"\"\"\nimport numpy as np\nimport pandas as pd\nimport statsmodels.api as sm\nfrom statsmodels.tools.sm_exceptions import PerfectSeparationError\n\ndef fit_logit(y: pd.Series, X: pd.DataFrame):\n    Xc = sm.add_constant(X, has_constant=\"add\")\n    try:\n        res = sm.Logit(y, Xc).fit(disp=0, maxiter=200)\n    except PerfectSeparationError as exc:\n        raise ValueError(\"Perfect separation: merge or drop a sparse level\") from exc\n    if not res.mle_retvals.get(\"converged\", False):\n        raise ValueError(\"Logit did not converge\")\n    return res\n\ndef odds_table(res) -> pd.DataFrame:\n    ci = res.conf_int()\n    out = pd.DataFrame({\n        \"odds_ratio\": np.exp(res.params),\n        \"ci_low\": np.exp(ci[0]),\n        \"ci_high\": np.exp(ci[1]),\n        \"p\": res.pvalues,\n    })\n    return out.drop(index=\"const\")\n```\n\nAn odds ratio of 1 means no difference from the baseline. An odds ratio of 2 means the odds of adoption double. Odds are not probabilities, and the distinction matters. At a baseline adoption of 17%, doubling the odds takes the probability to about 29%, not 34%. The next step converts to percentage points so nobody has to do that arithmetic.\n\nOn the fixture, the Cursor model recovers the planted structure. People at two-to-nine-person firms show a clearly higher odds ratio against the enterprise baseline, as do freelancers, while people with 21 or more years of experience show a lower one. The Copilot model shows the mirror image, with a lower ratio for tiny firms and a higher one for the most experienced.\n\n### Step 9: Test the Cursor-minus-Copilot gap with a bootstrap\n\nTwo sets of odds ratios do not tell you whether the tools differ on a segment. Both are noisy, and they come from the same respondents, so they are correlated. A bootstrap handles both problems. It resamples respondents with replacement, refits both models on every resample, and records the difference between the two log-odds coefficients. The 2.5th and 97.5th percentiles of those differences form a confidence interval on the gap.\n\n``` php\ndef bootstrap_gap(y_a, y_b, X, n_boot=300, seed=7) -> pd.DataFrame:\n    \"\"\"Percentile CI for (log OR tool A) - (log OR tool B) per term, resampling respondents.\"\"\"\n    rng = np.random.default_rng(seed)\n    n = len(X)\n    draws = []\n    for _ in range(n_boot):\n        idx = rng.integers(0, n, n)\n        Xb, ya, yb = X.iloc[idx], y_a.iloc[idx], y_b.iloc[idx]\n        try:\n            ra, rb = fit_logit(ya, Xb), fit_logit(yb, Xb)\n        except ValueError:\n            continue\n        draws.append((ra.params - rb.params).drop(\"const\"))\n    if len(draws) < n_boot * 0.9:\n        raise RuntimeError(f\"Only {len(draws)} of {n_boot} bootstrap fits converged\")\n    d = pd.DataFrame(draws)\n    return pd.DataFrame({\n        \"log_gap\": d.mean(),\n        \"gap_low\": d.quantile(0.025),\n        \"gap_high\": d.quantile(0.975),\n        \"n_fits\": len(d),\n    })\n```\n\nResampling whole respondents, rather than resampling each model separately, preserves the correlation between the two outcomes. That is the reason this beats a quick z-test on two published coefficients. The function also refuses to report if fewer than 90% of the fits converge, since a bootstrap built from the lucky subset would understate uncertainty.\n\nThe gap table needs careful reading. The columns `gap_low` and `gap_high` are on the log-odds scale. Exponentiate them to get a ratio of odds ratios. For the two-to-nine-person firms, the whole gap interval sits above zero, which means the Cursor odds ratio is larger than the Copilot one. When the interval excludes zero, the tools genuinely differ on that segment in the sample.\n\n## Phase 5: Marginal Effects, Report and Tests (Steps 10 to 12)\n\nThe last phase makes the results readable, wires up a command line, and locks the behavior with tests.\n\n### Step 10: Convert to marginal effects in percentage points\n\nManagers do not think in odds ratios. They think in points. The average marginal effect answers a question like this: if everyone in the sample moved from the baseline segment to this one, how many percentage points would adoption change on average? Statsmodels computes it with `get_margeff`, and the `dummy=True` flag makes it treat 0/1 columns as discrete jumps instead of derivatives.\n\n``` php\ndef marginal_effects(res) -> pd.DataFrame:\n    me = res.get_margeff(at=\"overall\", method=\"dydx\", dummy=True).summary_frame()\n    me = me.rename(columns={\"dy/dx\": \"pp_change\", \"Conf. Int. Low\": \"pp_low\", \"Cont. Int. Hi.\": \"pp_high\"})\n    keep = [c for c in [\"pp_change\", \"pp_low\", \"pp_high\"] if c in me.columns]\n    return me[keep] * 100\n```\n\nOn the fixture, moving from the enterprise baseline to a two-to-nine-person firm raises Cursor adoption by 19.0 points and lowers Copilot adoption by 25.8 points. Those numbers are planted, so they only prove the method works. On real data, this is the table you would put in a slide.\n\n### Step 11: Write the report and wire up the CLI\n\nThe report module computes Wilson intervals for the shares, merges the odds ratios with the bootstrap gaps, and writes a Markdown table. The CLI ties every step together.\n\n``` python\nimport numpy as np\nimport pandas as pd\n\ndef wilson(k: int, n: int, z: float = 1.96) -> tuple[float, float, float]:\n    p = k / n\n    d = 1 + z * z / n\n    centre = (p + z * z / (2 * n)) / d\n    half = z * np.sqrt(p * (1 - p) / n + z * z / (4 * n * n)) / d\n    return p, centre - half, centre + half\n\ndef share_line(name: str, flag: pd.Series) -> str:\n    base = int(flag.notna().sum())\n    k = int(flag.sum())\n    p, lo, hi = wilson(k, base)\n    return f\"{name:<8} {p:6.1%}  (95% CI {lo:5.1%} to {hi:5.1%})  k={k:,} base={base:,}\"\n\ndef combine(or_a: pd.DataFrame, or_b: pd.DataFrame, gap: pd.DataFrame, names=(\"cursor\", \"copilot\")) -> pd.DataFrame:\n    a, b = names\n    t = pd.DataFrame({\n        f\"OR_{a}\": or_a[\"odds_ratio\"],\n        f\"OR_{b}\": or_b[\"odds_ratio\"],\n        \"gap_low\": gap[\"gap_low\"],\n        \"gap_high\": gap[\"gap_high\"],\n    })\n    t[\"gap_signif\"] = (t[\"gap_low\"] > 0) | (t[\"gap_high\"] < 0)\n    return t.round(2)\n\ndef to_markdown(t: pd.DataFrame) -> str:\n    cols = [\"term\"] + list(t.columns)\n    lines = [\"| \" + \" | \".join(cols) + \" |\", \"|\" + \"---|\" * len(cols)]\n    for term, row in t.iterrows():\n        lines.append(\"| \" + \" | \".join([str(term)] + [str(v) for v in row.values]) + \" |\")\n    return \"\\n\".join(lines)\npython\nimport argparse\nfrom pathlib import Path\n\nimport pandas as pd\n\nfrom .columns import ALIASES, find_tool_columns, tool_flag\nfrom .features import build_features, design_matrix\nfrom .model import bootstrap_gap, fit_logit, marginal_effects, odds_table\nfrom .report import combine, share_line, to_markdown\n\ndef pick_columns(df, tool, override):\n    if override:\n        return override\n    found = find_tool_columns(df, tool)\n    if not found:\n        raise SystemExit(f\"No column mentions {tool}. Pass --{tool}-cols explicitly.\")\n    print(f\"[columns] {tool}: candidates {found}\")\n    best = next(iter(found))\n    print(f\"[columns] {tool}: using {best!r} (override with --{tool}-cols)\")\n    return [best]\n\ndef main(argv=None):\n    ap = argparse.ArgumentParser(prog=\"adopter_odds\")\n    ap.add_argument(\"csv\")\n    ap.add_argument(\"--cursor-cols\", nargs=\"*\")\n    ap.add_argument(\"--copilot-cols\", nargs=\"*\")\n    ap.add_argument(\"--boot\", type=int, default=300)\n    ap.add_argument(\"--min-level\", type=int, default=100)\n    ap.add_argument(\"--out\", default=\"out\")\n    a = ap.parse_args(argv)\n\n    df = pd.read_csv(a.csv, low_memory=False)\n    print(f\"[load] {len(df):,} rows, {df.shape[1]} columns\")\n\n    cur_cols = pick_columns(df, \"cursor\", a.cursor_cols)\n    cop_cols = pick_columns(df, \"copilot\", a.copilot_cols)\n    cur = tool_flag(df, cur_cols, ALIASES[\"cursor\"])\n    cop = tool_flag(df, cop_cols, ALIASES[\"copilot\"])\n\n    print(\"\\n[naive shares: each tool on its own denominator]\")\n    print(share_line(\"cursor\", cur))\n    print(share_line(\"copilot\", cop))\n\n    both = cur.notna() & cop.notna()\n    print(f\"\\n[common base] {int(both.sum()):,} respondents answered both questions\")\n    feats = build_features(df.loc[both], a.min_level).dropna()\n    keep = feats.index\n    y_cur, y_cop = cur.loc[keep], cop.loc[keep]\n    print(\"[common-base shares]\")\n    print(share_line(\"cursor\", y_cur))\n    print(share_line(\"copilot\", y_cop))\n\n    X = design_matrix(feats)\n    print(f\"[design] {len(X):,} rows, {X.shape[1]} dummies, baselines {X.attrs['baselines']}\")\n    res_cur, res_cop = fit_logit(y_cur, X), fit_logit(y_cop, X)\n    or_cur, or_cop = odds_table(res_cur), odds_table(res_cop)\n\n    print(f\"\\n[bootstrap] {a.boot} resamples\")\n    gap = bootstrap_gap(y_cur, y_cop, X, n_boot=a.boot)\n    table = combine(or_cur, or_cop, gap)\n    print(table.to_string())\n\n    me_cur, me_cop = marginal_effects(res_cur), marginal_effects(res_cop)\n    pp = pd.DataFrame({\"cursor_pp\": me_cur[\"pp_change\"], \"copilot_pp\": me_cop[\"pp_change\"]}).round(1)\n    print(\"\\n[average marginal effects, percentage points]\")\n    print(pp.to_string())\n\n    out = Path(a.out)\n    out.mkdir(exist_ok=True)\n    table.to_csv(out / \"odds_ratios.csv\")\n    pp.to_csv(out / \"marginal_effects.csv\")\n    (out / \"report.md\").write_text(to_markdown(table) + \"\\n\")\n    print(f\"\\n[write] {out}/odds_ratios.csv, marginal_effects.csv, report.md\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThe `__main__.py` file is a two-line shim so `python -m adopter_odds` works.\n\n``` python\nfrom .cli import main\n\nmain()\n```\n\nRun the full pipeline on the fixture. The 300-resample bootstrap took about 9.6 seconds of wall time on the test machine for 4,998 rows.\n\n```\npython -m adopter_odds data/synthetic_survey.csv --boot 300\n```\n\nThe run prints the table below and writes `odds_ratios.csv`, `marginal_effects.csv` and `report.md` into `out/`.\n\n```\n[bootstrap] 300 resamples\n                                 OR_cursor  OR_copilot  gap_low  gap_high  gap_signif\nage=18-24 years old                   1.08        0.84    -0.01      0.54       False\nage=35-44 years old                   0.64        1.09    -0.74     -0.32        True\nage=45-54 years old                   0.77        1.19    -0.72     -0.16        True\nage=55+ years old                     0.57        0.75    -0.64      0.13       False\norg=1,000 to 4,999 employees          1.90        0.68     0.77      1.33        True\norg=2 to 9 employees                  2.98        0.32     1.91      2.58        True\norg=20 to 99 employees                1.79        0.56     0.88      1.45        True\norg=Just me - I am a freelancer       2.66        0.48     1.37      2.10        True\nexp=0-2 yrs                           1.21        0.93    -0.05      0.58       False\nexp=11-20 yrs                         0.96        1.16    -0.45      0.05       False\nexp=21+ yrs                           0.50        1.44    -1.49     -0.59        True\nexp=3-5 yrs                           1.11        0.97    -0.10      0.38       False\nrole=data_ml                          1.02        1.11    -0.37      0.19       False\nrole=other                            1.05        1.08    -0.25      0.17       False\n[average marginal effects, percentage points]\n                                 cursor_pp  copilot_pp\nage=18-24 years old                    1.1        -4.3\nage=35-44 years old                   -5.9         2.1\nage=45-54 years old                   -3.5         4.1\nage=55+ years old                     -6.6        -7.0\norg=1,000 to 4,999 employees           9.8        -9.2\norg=2 to 9 employees                  19.0       -25.8\norg=20 to 99 employees                 8.8       -13.8\norg=Just me - I am a freelancer       16.9       -17.3\nexp=0-2 yrs                            2.8        -1.8\nexp=11-20 yrs                         -0.5         3.6\nexp=21+ yrs                           -7.8         8.6\nexp=3-5 yrs                            1.5        -0.8\nrole=data_ml                           0.3         2.6\nrole=other                             0.7         1.9\n```\n\n### Step 12: Add tests and run on the real file\n\nTests turn the planted truth into a safety net. They check that token matching is exact, that blank answers stay missing, that column discovery finds both tools, that the model recovers planted signs, and that the bootstrap runs.\n\n``` python\nimport numpy as np\nimport pandas as pd\nimport pytest\n\nfrom adopter_odds.columns import ALIASES, find_tool_columns, has_token, tool_flag\nfrom adopter_odds.features import build_features, design_matrix\nfrom adopter_odds.model import bootstrap_gap, fit_logit, odds_table\n\n@pytest.fixture(scope=\"module\")\ndef df():\n    return pd.read_csv(\"data/synthetic_survey.csv\")\n\ndef test_token_match_is_exact():\n    s = pd.Series([\"Visual Studio Code;Cursor\", \"Cursor Tab\", None, \"Zed\"])\n    out = has_token(s, ALIASES[\"cursor\"])\n    assert out.tolist()[0] == 1.0 and out.tolist()[1] == 0.0\n    assert np.isnan(out.iloc[2])\n\ndef test_blank_is_not_zero():\n    d = pd.DataFrame({\"a\": [\"GitHub Copilot\", \"ChatGPT\", None]})\n    f = tool_flag(d, [\"a\"], ALIASES[\"copilot\"])\n    assert f.tolist()[:2] == [1.0, 0.0] and np.isnan(f.iloc[2])\n\ndef test_discovery_finds_both_tools(df):\n    assert \"DevEnvs\" in find_tool_columns(df, \"cursor\")\n    assert \"AIAgents\" in find_tool_columns(df, \"copilot\")\n\ndef test_recovers_planted_signs(df):\n    cur = tool_flag(df, [\"DevEnvs\"], ALIASES[\"cursor\"])\n    cop = tool_flag(df, [\"AIAgents\"], ALIASES[\"copilot\"])\n    both = cur.notna() & cop.notna()\n    feats = build_features(df.loc[both], 100).dropna()\n    X = design_matrix(feats)\n    or_cur = odds_table(fit_logit(cur.loc[feats.index], X))\n    or_cop = odds_table(fit_logit(cop.loc[feats.index], X))\n    assert or_cur.loc[\"age=55+ years old\", \"odds_ratio\"] < 0.7\n    assert or_cur.loc[\"org=2 to 9 employees\", \"odds_ratio\"] > 1.5\n    assert or_cop.loc[\"org=2 to 9 employees\", \"odds_ratio\"] < 0.7\n\ndef test_bootstrap_runs(df):\n    cur = tool_flag(df, [\"DevEnvs\"], ALIASES[\"cursor\"])\n    cop = tool_flag(df, [\"AIAgents\"], ALIASES[\"copilot\"])\n    both = cur.notna() & cop.notna()\n    feats = build_features(df.loc[both], 100).dropna()\n    X = design_matrix(feats)\n    gap = bootstrap_gap(cur.loc[feats.index], cop.loc[feats.index], X, n_boot=20)\n    assert {\"log_gap\", \"gap_low\", \"gap_high\"} <= set(gap.columns)\npython -m pytest -q\n.....                                                                    [100%]\n5 passed in 2.68s\n```\n\nNotice the assertions use age 55-plus and the two-to-nine-person level, not age 18 to 24. The first draft of the test asserted a high odds ratio for the youngest group and failed, because the baseline is the 25 to 34 band, which already carries a planted lift. The planted gap between 18-24 and 25-34 is small, so a modest sample estimate was honest. A test that fought the baseline logic was wrong, not the code. That small failure is the best argument for testing against planted effects.\n\nNow point the tool at the real file. If you downloaded a 2025 or 2026 CSV, run the following and read the `[columns]` lines first.\n\n```\npython -m adopter_odds data/survey_results_public.csv --boot 300\n```\n\nIf the discovery picks a column you did not intend, override it. Running the same command on both survey years gives you two odds-ratio tables, and the [survey drift decomposition](https://shattered.io/cursor-vs-copilot-survey-drift-duckdb-decomposition-12-steps-2026/) on this site shows how to separate real movement from changes in who answered.\n\n## What Changed Since the Survey: Plans, Billing and Models\n\nSurvey answers describe a tool as it stood when the respondent answered. Both products have moved since, and the segments your regression finds should be read against that backdrop. Copilot is the larger shift on the billing side. GitHub moved all Copilot plans to usage-based billing on June 1, 2026, with monthly GitHub AI Credits where one credit equals $0.01, according to [GitHub’s models and pricing documentation](https://docs.github.com/en/copilot/reference/copilot-billing/models-and-pricing?ref=cms.ondi.jp) and its April 27 announcement. The individual lineup is now Free, Pro, Pro+ and Max, and the organization plans are Business and Enterprise.\n\nCursor reshaped its own ladder. Its current individual tiers run from Free through Plus, Premium, Super and Ultra, and annual billing is listed at $80, $300, $1,000 and $2,000 for the four paid tiers. Cursor is the product of Anysphere, whose [company site](https://anysphere.inc/) still presents it as the main offering. Teams start at $30 per user per month, and Enterprise is custom-priced.\n\n| Tier | Cursor (monthly) | GitHub Copilot (monthly) | \n|---|---|---|\n| Free | $0 | $0 | \n| Entry paid | Plus, $8 | Pro, $10 | \n| Mid paid | Premium, $30 | Pro+, $39 | \n| High paid | Super, $100 | Max, $100 | \n| Top individual | Ultra, $200 | No higher individual tier listed | \n| Team or organization | Teams, from $30 per user | Business, $19 per granted seat | \n| Enterprise | Custom | Enterprise, $39 per granted seat | \n\nIncluded usage also differs in structure. Copilot Pro includes $10 of base credits plus $5 of flex usage, for $15 in total. Pro+ includes $39 plus $31 for $70, and Max includes $100 plus $100 for $200. Cursor’s Premium tier is marked as its most popular plan on the pricing page.\n\nThe model lists moved too. GitHub’s changelog records OpenAI’s GPT-6.2 Astra and GPT-6.2 Sol reaching general availability in Copilot on November 17, 2026, along with Microsoft’s MAI Code 2 and MAI Code 2 Flash. Gemini 4 Neon followed on November 18. Cursor’s release notes list Claude Opus 5.5 and Claude Sonnet 5.5 among the models now available. None of this appears in a survey that asked about the past year, which is one more reason to treat shares as a snapshot of respondent behavior rather than a scoreboard.\n\nPricing structure also bears on how you read the enterprise segment in your regression. GitHub’s November changelog says licensed GitHub Enterprise Cloud users can receive Copilot access at $0. If many of your enterprise-sized respondents get Copilot bundled with their platform license, a high Copilot odds ratio at that size reflects procurement as much as preference. The [Copilot usage audit comparing Cursor installs and seats](https://shattered.io/github-copilot-usage-audit-cursor-installs-seats-12-steps-2026/) on this site shows how to separate paid seats from active use when you have internal data.\n\n## How to Read the Output Without Fooling Yourself\n\nThe pipeline prints a lot of numbers. Five rules keep the interpretation honest, and the table after them works as a quick reference for each column.\n\nFirst, read odds ratios against the baseline the tool printed. The `[design]` line lists the baseline for each feature. An odds ratio for freelancers means freelancers versus the enterprise baseline, not freelancers versus everyone.\n\nSecond, use percentage points for anything that leaves the data team. The marginal effects table answers the question executives ask, which is how many more or fewer people in this segment use the tool.\n\nThird, look at the gap interval before you claim a difference. If `gap_low` and `gap_high` straddle zero, the sample does not support saying Cursor and Copilot differ on that segment. On the fixture, age 18 to 24 shows a gap interval that just touches zero, so no claim is warranted.\n\nFourth, remember that 14 terms get tested at once. At a 0.05 threshold, you expect about 0.7 false positives across 14 independent terms (14 times 0.05). A single borderline segment should make you cautious, while a pattern across related segments, such as every organization-size band moving the same direction, deserves more trust.\n\nFifth, keep the word association in every sentence. A regression on survey answers shows that two traits travel together. It does not show that company size causes tool choice.\n\n| Output column | Scale | How to read it | \n|---|---|---|\n| `OR_cursor` ,`OR_copilot` | Ratio of odds | 1 means no difference from baseline, 2 doubles the odds | \n| `gap_low` ,`gap_high` | Log-odds difference | Exponentiate for a ratio of odds ratios, zero inside means no clear gap | \n| `gap_signif` | True or False | True when the interval excludes zero | \n| `cursor_pp` ,`copilot_pp` | Percentage points | Average change in adoption versus the baseline segment | \n| `base` in share lines | Respondent count | The denominator, always check it before quoting a share | \n\nOverlap also matters. Many developers use both tools, so the two outcomes are not exclusive. The [Jaccard and lift overlap analysis](https://shattered.io/cursor-vs-copilot-survey-overlap-jaccard-lift-12-steps-2026/) on this site quantifies how often the two co-occur, and the advanced section below shows how to model the four combinations directly.\n\n## Common Pitfalls\n\nMost failures in this kind of project come from a short list of mistakes. Each one produces output that looks plausible, which is what makes them dangerous.\n\n**Treating blank answers as zero.** A respondent who never saw the AI-agent question is not a non-user. Coding blanks as zero drags the Copilot share down and inflates the apparent Cursor lead. The three-state flag in Step 5 exists to prevent this. If you simplify it, keep the missing state.\n\n**Substring matching on tool names.** A search for `cursor` inside free text can match unrelated words, and a loose match on `copilot` catches Microsoft Copilot, which Stack Overflow lists separately from GitHub Copilot in the 2025 results. Use exact tokens. The alias sets in `columns.py` hold only `cursor` and `github copilot` for that reason.\n\n**Forgetting the baseline.** The model’s reference group changes every odds ratio. If 25 to 34 is your baseline and it already carries a lift, then 18 to 24 can look unremarkable even though both bands sit far above the oldest group. Always print the baselines, and consider setting them explicitly when you compare years.\n\n**Chasing a lone significant segment.** With 14 terms in the table, one flagged row is weak evidence. Prefer patterns, and consider a Bonferroni-style cutoff of 0.05 divided by 14 when you need a conservative call.\n\n**Confusing odds ratios with probability ratios.** An odds ratio does not mean the same multiple of the adoption rate. At a 17% base rate, tripling the odds gives roughly 38%, about 2.2 times the rate. Quote percentage points to avoid the trap.\n\n**Comparing columns across years without checking the question.** A tool can move from one survey list to another between years, so any chart that follows its editor share can show it disappearing. Cursor and Copilot can shift lists the same way. Before you compare 2025 and 2026 odds ratios, confirm that each tool sits in a comparable question both years. The year-over-year drift analysis separates real movement from question changes.\n\n**Reading survey share as market share.** None of the sources checked for this article provide a directly comparable market-share figure for Cursor versus Copilot. A survey of Stack Overflow’s audience tells you about that audience. Say so in the sentence.\n\n## Troubleshooting\n\nThese ten failures account for most of the questions you will hit when you run the tool on a real file. Each entry gives the symptom, the cause and the fix.\n\n1. **`No column mentions cursor`.** The scan found fewer than 20 exact-token hits in any column. Check that you loaded the responses file and not the schema file, then open the header and find the editor or AI-tool column by hand. Pass it with`--cursor-cols ColumnName` . If the tool is listed under a different label, add the label to`ALIASES` in`columns.py` .\n2. **The common base is tiny.** If only a few hundred rows answered both questions, the two tools sit in questions with little overlap. Pass several columns to`--cursor-cols` or`--copilot-cols` so the flag counts anyone who answered at least one. If the base is still small, fit each tool on its own base and say so in the report.\n3. **`ValueError: Perfect separation`.** A level has so few rows that it predicts the outcome perfectly. Raise`--min-level` so rare levels merge into`Other` , or drop the feature.\n4. **`LinAlgError: Singular matrix`.** Two dummy columns are identical or one is all zeros. This happens when a feature has a single level after filtering. Print`X.nunique()` and drop constant columns.\n5. **`Logit did not converge`.** Usually a sparse level again. Raise` maxiter` , lump rare levels, or standardize numeric inputs if you added any. If it persists, try the regularized fit in the advanced section.\n6. **The bootstrap takes too long.** Each resample fits two logistic models. On the fixture, 300 resamples took about 9.6 seconds of wall time for 4,998 rows, and a full survey file will take longer. Use`--boot 50` while developing and`--boot 500` for the final run.\n7. **`KeyError: 'Cont. Int. Hi.'` or a similar column name.** Statsmodels labels its marginal-effects frame columns with its own spelling, and a newer release may change it. Print`me.columns` inside`marginal_effects` and update the rename map.\n8. **Encoding errors on Windows.** Add`encoding=\"utf-8\"` to the`read_csv` call, or pass`encoding_errors=\"replace\"` if the file has stray bytes.\n9. **A `.str` accessor error.** On older pandas,`.str` fails on columns that are not strings. The module guards with`is_string_dtype` . If you pass a custom column, cast it with`astype(str)` first and restore missing values afterward.\n10. **A test fails with `KeyError: 'age=18-24 years old'`.** The level was lumped into` Other` or the baseline absorbed it. Print`odds_table(...).index` to see the surviving names and update the assertion.\n\n## Advanced Tips\n\nOnce the basic run works, five extensions add real analytical power without much code.\n\n**Model the four combinations.** Cursor and Copilot overlap, so a single outcome per tool hides multi-homing. Code each respondent as 0 for neither, 1 for Cursor only, 2 for Copilot only and 3 for both, then fit a multinomial logit.\n\n``` python\nimport statsmodels.api as sm\n\ncode = (cur.loc[feats.index] * 1 + cop.loc[feats.index] * 2).astype(int)\nmn = sm.MNLogit(code, sm.add_constant(X)).fit(disp=0)\nprint(mn.summary())\n```\n\nOn the synthetic fixture the four groups (neither, Cursor only, Copilot only and both) all have enough people, so the model has enough data in each cell. Real surveys can have thin cells, so check the counts first.\n\n**Add weights.** If you build post-stratification weights, pass them as frequency weights through a binomial GLM. The raking approach from Step 6 builds them.\n\n```\nw = pd.Series(1.0, index=X.index)   # replace with your weights\nres = sm.GLM(y, sm.add_constant(X), family=sm.families.Binomial(), freq_weights=w).fit()\n```\n\n**Regularize when levels are sparse.** An L1 penalty shrinks unstable coefficients toward zero and avoids separation errors.\n\n```\nreg = sm.Logit(y, sm.add_constant(X)).fit_regularized(method=\"l1\", alpha=2.0, disp=0)\n```\n\nNote that penalized coefficients are biased by design, so use them to screen features, not to report final odds ratios. On the fixture, the penalized odds ratio for two-to-nine-person firms came out at 2.70 against the unpenalized 2.98.\n\n**Test interactions.** Age and organization size may interact. A freelancer in their twenties and a freelancer in their fifties may behave differently. Build a combined feature, `feats[\"age_org\"] = feats[\"age\"] + \" | \" + feats[\"org\"]`, and run the design matrix on it. Expect many sparse cells, which brings you back to lumping.\n\n**Pool the years with an interaction.** Stack the 2025 and 2026 files, add a year dummy, and interact it with each segment. A significant interaction means the segment’s relationship with a tool changed between waves. Only do this after you confirm the question wording matches, per the pitfalls above.\n\nFor a wider view of tools in this category, the [software coverage hub](https://shattered.io/category/software/) collects the related comparisons and tutorials.\n\n## FAQ\n\n### Does the Stack Overflow survey measure market share?\n\nNo. It measures what its respondents report using, and that audience is self-selected. Stack Overflow’s own 2025 numbers pair a 17.9% Cursor figure drawn from all respondents with a roughly 68% Copilot figure drawn from AI-assistant users, which are different bases. Treat shares as adoption among respondents and quote the base every time.\n\n### Which survey year should I analyze in November 2026?\n\nThe 2026 Developer Survey, published October 6, 2026, is the latest. Use the 2025 file when you need the earlier wave for a year-over-year comparison, and label it as historical. The tool runs the same way on both files as long as the columns are found.\n\n### Why do two sources show different Copilot numbers for 2026?\n\nOne page reports Copilot at 58.7% among coding agents and assistants used in the past year, while Stackness reports 61.3% among 11,739 coding-agent answerers using its own counts. The sources do not explain the difference. Plausible causes include base, question wording and exclusion rules, which is exactly what Steps 4 and 5 make visible. Run the tool on the raw file to see which base reproduces which number.\n\n### Do I need the real survey files to learn the method?\n\nNo. The synthetic fixture lets you verify every step offline, and the tests prove the pipeline recovers planted effects. Move to the real file once the tests pass, and read the discovered columns before trusting any number.\n\n### What does an odds ratio of 2 mean?\n\nThe odds of adoption double relative to the baseline segment. Odds differ from probabilities, so a doubling at a 17% base rate lifts the probability to about 29%. Use the marginal-effects table for percentage points.\n\n### Can I add other tools such as Claude Code or Codex?\n\nYes. Add an alias set to `ALIASES` in `columns.py`, run discovery, and add a third flag. Check which list each tool sits in, because a tool can change lists between survey years.\n\n### Why bootstrap instead of comparing the two confidence intervals by eye?\n\nBoth models use the same respondents, so their estimates are correlated. Two overlapping intervals do not prove equality, and two separate ones do not prove a difference. Resampling respondents and refitting both models gives a direct interval on the gap.", "url": "https://wpnews.pro/news/cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min", "canonical_source": "https://shattered.io/cursor-vs-copilot-adoption-drivers-logistic-regression-12-steps-2026/", "published_at": "2026-11-30 01:42:19+00:00", "updated_at": "2026-11-30 01:46:54.530081+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "ai-products"], "entities": ["Stack Overflow", "Cursor", "GitHub Copilot", "Claude Code", "Stackness"], "also_reported_by": [], "takeaway": "Comparing tool shares across different survey bases is misleading: Stack Overflow's 2026 data puts Cursor at 25.5% and Copilot at 58.7% on the AI page, but Stackness counts Copilot at 61.3% and Claude Code at 68.4% among the 11,739 coding-agent respondents, so fit one logistic regression per tool on", "recommendation": {"advice": "Before trusting a tool-adoption share, check its denominator and question wording, then fit per-tool logistic regressions on the same respondents and bootstrap the difference; the 2026 survey's editor base (13,120) and coding-agent base (11,739) differ by 1,381 people.", "playbook": "evals-testing", "playbook_url": "https://wpnews.pro/playbooks/evals-testing"}, "alternates": {"html": "https://wpnews.pro/news/cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min", "markdown": "https://wpnews.pro/news/cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min.md", "text": "https://wpnews.pro/news/cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min.txt", "jsonld": "https://wpnews.pro/news/cursor-vs-copilot-adopters-odds-ratios-in-12-steps-75-min.jsonld"}}