# GEE (/docs/analyses/gee)



## When to use it [#when-to-use-it]

Use GEE when the outcome is yes or no and the rows cluster, and you want the average effect across clusters. Pass or fail inside a clinic is the usual case. A random intercept you want to read as a variance is a [GLMM](/docs/analyses/generalized-linear-mixed-model).

## Assumptions [#assumptions]

The outcome is binary. The predictors are numeric. The grouping column has at least two clusters. The working correlation is exchangeable: two people in the same cluster are treated as equally correlated. There is no switch for the family or the correlation.

## Running it in Tensr [#running-it-in-tensr]

<Steps>
  <Step>
    Multivariate → Mixed Models → GEE (clustered binary). In chat: “GEE of passed on hours, clustered by clinic.”
  </Step>

  <Step>
    The outcome is the binary column. Predictors need at least one numeric column. Grouping variable is the cluster.
  </Step>
</Steps>

The dialog reuses the mixed-model form, so it also shows random slopes and a REML switch, and it labels the dependent as numeric. This request sends the outcome, the predictors, and the group. The outcome has to be binary. Random slopes and REML are not part of this fit.

## Options [#options]

<TypeTable
  type="{
  outcome: {
    type: 'string',
    description: 'Binary outcome. Two values only.',
  },
  independents: {
    type: 'string[]',
    description: 'Numeric predictors. At least one.',
  },
  group: {
    type: 'string',
    description: 'Cluster id.',
  },
  decimal_places: {
    type: '0–6',
    description: 'Report output. Decimal places.',
    default: '3',
  },
  apa_format: {
    type: 'boolean',
    description: 'Report output. APA-style p-values.',
    default: 'true',
  },
  include_charts: {
    type: 'boolean',
    description: 'Report output. This procedure does not add its own chart.',
    default: 'true',
  },
}"
/>

## Reading the output [#reading-the-output]

The clustered pass/fail outcome, population-average, exchangeable correlation within clinic.

| Term  | Coefficient |    SE |      z |    p | 95% CI low | 95% CI high |
| ----- | ----------: | ----: | -----: | ---: | ---------: | ----------: |
| const |       -1.48 | 0.768 | -1.926 | .054 |     -2.986 |       0.026 |
| hours |       0.326 |  0.15 |  2.175 | .030 |      0.032 |        0.62 |

GEE binomial (exchangeable) for `passed` clustered by `clinic`. GEE binomial (exchangeable) for `passed` clustered by `clinic`. Metrics: Family = binomial; Correlation = exchangeable; Groups = 12; Observations = 120.

## Reporting (APA 7) [#reporting-apa-7]

GEE binomial (exchangeable) for `passed` clustered by `clinic`. Report the estimate in the table. This procedure is not summarised by one p-value.

## Coming from SPSS [#coming-from-spss]

The product menu is Multivariate → Mixed Models → GEE (clustered binary). SPSS fits this with GENLIN, a binomial distribution, and a repeated subject with an exchangeable correlation. The path string stored for this item says Analyze → Generalized Linear Models → GEE. The item itself is on the Multivariate menu.

## Related [#related]

A random intercept for the same kind of outcome is the [GLMM](/docs/analyses/generalized-linear-mixed-model). Independent rows: [logistic regression](/docs/analyses/logistic-regression).
