> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/survey-programming-decipher/complexity-support/segmentation.md).

# Segmentation

* **Scenario 1**

Segmentation with question answers is multiplied by a specific coefficient for each segment, then a constant is added to calculate the total segment score and then punching the segment that has the max segment score as the final segment.

Let's take a look at an example for this:

Question type for each of the questions are mentioned below:

Q1 = Radio question with column

Q2 = Radio question with column

Q3 = Number question

Q4 = Number question

Segment calculation logic:

<table data-header-hidden><thead><tr><th width="223.50390625"></th><th></th><th></th><th></th><th></th></tr></thead><tbody><tr><td>Question</td><td>Likert scale answer (1 to 5)</td><td><p>Segment 1:</p><p>"Uninterested"</p></td><td><p>Segment 2:</p><p>"Passively interested"</p></td><td><p>Segment 3:</p><p>"Actively interested"</p></td></tr><tr><td>Q1: How important do you think it is for citizens to volunteer or donate to protect endangered species?</td><td></td><td>-0.561135188</td><td>0.045301485</td><td>2.023393358</td></tr><tr><td>Q2: To what extent do you agree that wildlife conservation should be a priority for governments?</td><td></td><td>-0.351733944</td><td>2.31670683</td><td>0.156779107</td></tr><tr><td>Q3: How concerned are you about the impact of human activities on wildlife habitats?</td><td></td><td>-0.65961061</td><td>0.278996417</td><td>0.467290048</td></tr><tr><td>Q4: How supportive are you of initiatives to reintroduce native species to their original habitats?</td><td></td><td>-0.559083482</td><td>0.488902614</td><td>0.141627905</td></tr><tr><td>Constant</td><td>1</td><td>9.802423437</td><td>-0.39186368</td><td>-0.959236738</td></tr><tr><td>Total segment score</td><td>-</td><td>-</td><td>-</td><td>-</td></tr></tbody></table>

* **Scenario 2**

Segmentation with variable recording before multiplying it with co-efficient and adding it to a constant.

Let's take a look at an example for this:

Question type for each of the questions are mentioned below:

Q1 = Radio question with column

Q2 = Radio question with column

Q3 = Checkbox question rows

Q4 = Radio question what rows and columns

Q5 = Radio question with columns

Q6 = Checkbox question with rows

Q7 = Radio question with rows

​

Recoding logic:

<table data-header-hidden><thead><tr><th width="239.734375"></th><th></th></tr></thead><tbody><tr><td>Variable</td><td>Recoding Logic</td></tr><tr><td>Q1_1</td><td>If Q1 = 1, code as 1; else code as 0</td></tr><tr><td>Q1_2</td><td>If Q1 = 2, code as 1; else code as 0</td></tr><tr><td>Q1_3</td><td>If Q1 = 3, code as 1; else code as 0</td></tr><tr><td>Q2_1</td><td>If Q2 = 1, code as 1; else code as 0</td></tr><tr><td>Q2_2</td><td>If Q2 = 2, code as 1; else code as 0</td></tr><tr><td>Q2_3</td><td>If Q2 = 3, code as 1; else code as 0</td></tr><tr><td>Q2_4</td><td>If Q2 = 4, code as 1; else code as 0</td></tr><tr><td>Q2_5</td><td>If Q2 = 5, code as 1; else code as 0</td></tr><tr><td>Q3r1</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r2</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r3</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r4</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r5</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r6</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r7</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r8</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q3r9</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q4r1_1</td><td>If Q4r1 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r1_2</td><td>If Q4r1 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r1_3</td><td>If Q4r1 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r1_4</td><td>If Q4r1 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r2_1</td><td>If Q4r2 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r2_2</td><td>If Q4r2 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r2_3</td><td>If Q4r2 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r2_4</td><td>If Q4r2 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r3_1</td><td>If Q4r3 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r3_2</td><td>If Q4r3 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r3_3</td><td>If Q4r3 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r3_4</td><td>If Q4r3 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r4_1</td><td>If Q4r4 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r4_2</td><td>If Q4r4 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r4_3</td><td>If Q4r4 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r4_4</td><td>If Q4r4 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r5_1</td><td>If Q4r5 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r5_2</td><td>If Q4r5 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r5_3</td><td>If Q4r5 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r5_4</td><td>If Q4r5 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r6_1</td><td>If Q4r6 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r6_2</td><td>If Q4r6 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r6_3</td><td>If Q4r6 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r6_4</td><td>If Q4r6 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r7_1</td><td>If Q4r7 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r7_2</td><td>If Q4r7 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r7_3</td><td>If Q4r7 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r7_4</td><td>If Q4r7 = 4, code as 1; else code as 0</td></tr><tr><td>Q4r8_1</td><td>If Q4r8 = 1, code as 1; else code as 0</td></tr><tr><td>Q4r8_2</td><td>If Q4r8 = 2, code as 1; else code as 0</td></tr><tr><td>Q4r8_3</td><td>If Q4r8 = 3, code as 1; else code as 0</td></tr><tr><td>Q4r8_4</td><td>If Q4r8 = 4, code as 1; else code as 0</td></tr><tr><td>Q5_1</td><td>If Q5 = 1, code as 1; else code as 0</td></tr><tr><td>Q5_2</td><td>If Q5 = 2, code as 1; else code as 0</td></tr><tr><td>Q6r1</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r2</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r3</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r4</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r5</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r6</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r7</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q6r8</td><td>No recode necessary; 1 = selected &#x26; 0 = unselected</td></tr><tr><td>Q7_1</td><td>If Q7 = 1, code as 1; else code as 0</td></tr><tr><td>Q7_2</td><td>If Q7 = 2, code as 1; else code as 0</td></tr><tr><td>Q7_3</td><td>If Q7 = 3, code as 1; else code as 0</td></tr><tr><td>Q7_4</td><td>If Q7 = 4, code as 1; else code as 0</td></tr><tr><td>Q7_5</td><td>If Q7 = 5, code as 1; else code as 0</td></tr><tr><td>Q7_6</td><td>If Q7 = 6, code as 1; else code as 0</td></tr><tr><td>Q7_7</td><td>If Q7 = 7, code as 1; else code as 0</td></tr><tr><td>Q7_8</td><td>If Q7 = 8, code as 1; else code as 0</td></tr><tr><td>Q7_9</td><td>If Q7 = 9, code as 1; else code as 0</td></tr><tr><td>Q7_10</td><td>If Q7 = 10, code as 1; else code as 0</td></tr><tr><td>Q7_11</td><td>If Q7 = 11, code as 1; else code as 0</td></tr><tr><td>Q7_12</td><td>If Q7 = 12, code as 1; else code as 0</td></tr></tbody></table>

Segment calculation logic:

| Variable | Segment 1 | Segment 2 | Segment 3 | Segment 4 | Segment 5 | Segment 6 |
| -------- | --------- | --------- | --------- | --------- | --------- | --------- |
| Q1\_1    | 18.0767   | 22.05169  | 20.87446  | 23.62055  | 22.4346   | 25.46154  |
| Q1\_2    | 16.23301  | 19.74055  | 18.7242   | 19.15496  | 19.43095  | 18.33225  |
| Q1\_3    | 16.65306  | 18.43816  | 18.337    | 17.75301  | 18.48681  | 17.79924  |
| Q2\_1    | 83.41005  | 85.85887  | 86.66188  | 86.7295   | 85.37157  | 87.98126  |
| Q2\_2    | 82.32566  | 85.62216  | 86.43268  | 87.50796  | 85.54803  | 84.26265  |
| Q2\_3    | 81.92598  | 84.89426  | 85.45443  | 85.48974  | 84.77049  | 83.23104  |
| Q2\_4    | 82.56818  | 84.15394  | 84.70123  | 84.55268  | 84.40516  | 82.70466  |
| Q2\_5    | 87.15362  | 87.85616  | 88.06397  | 88.73812  | 88.32302  | 86.75745  |
| Q3r1     | 3.147795  | 3.090329  | 4.353368  | 2.848069  | 1.99812   | 3.646036  |
| Q3r2     | 4.677952  | 4.955191  | 3.788802  | 4.228256  | 4.025644  | 4.977211  |
| Q3r3     | 5.277959  | 5.71047   | 5.98173   | 9.81709   | 7.764079  | 7.357867  |
| Q3r4     | 4.633902  | 4.279482  | 6.428023  | 7.21813   | 5.677258  | 5.480364  |
| Q3r5     | 3.248075  | 3.804778  | 2.684756  | 2.658239  | 3.440625  | 3.508464  |
| Q3r6     | 6.786563  | 7.052425  | 8.045186  | 6.642545  | 6.904374  | 7.129207  |
| Q3r7     | 4.568831  | 5.420923  | 5.042387  | 4.022642  | 4.473734  | 4.183822  |
| Q3r8     | 3.08382   | 3.016078  | 3.184092  | 3.530534  | 3.558504  | 3.509536  |
| Q3r9     | 4.416722  | 4.270809  | 6.645938  | 5.226696  | 5.451685  | 4.804677  |
| Q4r1\_1  | 4.074502  | 4.376876  | 4.541224  | 4.253495  | 2.181111  | 6.402298  |
| Q4r1\_2  | 2.747891  | 2.880356  | 4.007702  | 4.041661  | 1.681463  | 5.514703  |
| Q4r1\_3  | 4.698259  | 4.897728  | 5.382919  | 5.464882  | 3.381889  | 6.065176  |
| Q4r1\_4  | 2.969259  | 3.042033  | 3.091767  | 3.46961   | 1.859063  | 3.953858  |
| Q4r2\_1  | 9.176468  | 8.853241  | 9.174171  | 9.725798  | 8.647695  | 6.892554  |
| Q4r2\_2  | 2.741122  | 4.048006  | 2.974923  | 3.679902  | 3.63364   | 3.420566  |
| Q4r2\_3  | 0.949125  | 1.992864  | 1.882977  | 2.386896  | 1.747279  | 2.486078  |
| Q4r2\_4  | 2.909757  | 3.735983  | 3.713474  | 4.247346  | 3.739991  | 4.63123   |
| Q4r3\_1  | 12.96681  | 11.83703  | 13.52748  | 9.971731  | 9.433446  | 3.878918  |
| Q4r3\_2  | 9.775593  | 9.239915  | 9.612797  | 6.330269  | 6.18632   | 2.118337  |
| Q4r3\_3  | 9.837698  | 9.722221  | 9.459752  | 7.67869   | 7.553319  | 3.287871  |
| Q4r3\_4  | 8.288795  | 8.76809   | 7.933279  | 7.030374  | 6.749627  | 3.61705   |
| Q4r4\_1  | 14.64703  | 14.21732  | 10.66585  | 13.72305  | 12.36433  | 18.54302  |
| Q4r4\_2  | 10.26099  | 10.22452  | 6.757315  | 10.26178  | 8.72929   | 11.04825  |
| Q4r4\_3  | 10.61078  | 10.04199  | 7.315017  | 10.30968  | 8.844427  | 11.03538  |
| Q4r4\_4  | 10.27566  | 10.11727  | 8.635031  | 9.90983   | 8.761242  | 10.32051  |
| Q4r5\_1  | 8.411017  | 9.005973  | 10.9419   | 10.32382  | 6.520635  | 4.905538  |
| Q4r5\_2  | 5.120288  | 6.092087  | 6.693918  | 6.442216  | 4.932918  | 3.089617  |
| Q4r5\_3  | 5.247238  | 5.636732  | 6.209737  | 5.828761  | 4.379031  | 2.518693  |
| Q4r5\_4  | 4.883993  | 5.349388  | 4.890349  | 5.185007  | 4.305264  | 2.662467  |
| Q4r6\_1  | 3.396115  | 4.4294    | 4.216994  | 4.758163  | 4.291015  | 6.92498   |
| Q4r6\_2  | 4.521206  | 6.259241  | 5.800834  | 6.444499  | 6.001652  | 7.507017  |
| Q4r6\_3  | 3.690594  | 4.590393  | 5.168465  | 4.83102   | 5.483137  | 5.693942  |
| Q4r6\_4  | 3.416975  | 3.977436  | 3.92668   | 4.068796  | 4.499687  | 4.707107  |
| Q4r7\_1  | 25.71216  | 24.40168  | 25.56321  | 25.73595  | 22.95961  | 27.91159  |
| Q4r7\_2  | 25.1666   | 23.44218  | 25.85547  | 25.4982   | 23.08291  | 27.08061  |
| Q4r7\_3  | 25.31247  | 24.79049  | 26.11898  | 26.60817  | 24.31205  | 27.9498   |
| Q4r7\_4  | 26.49405  | 25.6245   | 27.31551  | 27.58989  | 26.14568  | 28.70935  |
| Q4r8\_1  | 15.74686  | 13.16973  | 13.42637  | 13.56773  | 13.70189  | 19.11445  |
| Q4r8\_2  | 12.56457  | 10.59526  | 11.07122  | 11.02795  | 11.13873  | 13.42709  |
| Q4r8\_3  | 13.52893  | 12.46739  | 12.50857  | 13.09962  | 12.44144  | 13.51688  |
| Q4r8\_4  | 11.01671  | 10.48131  | 10.86398  | 11.37414  | 10.85244  | 11.19533  |
| Q5\_1    | 51.39918  | 51.68872  | 49.17817  | 49.88453  | 49.6692   | 51.68193  |
| Q5\_2    | 50.76572  | 50.95601  | 50.08092  | 51.19722  | 50.79166  | 51.55262  |
| Q6r1     | -0.53618  | 1.087943  | 0.186941  | 1.304234  | 0.634862  | 0.98776   |
| Q6r2     | -0.86776  | 1.275798  | -0.1099   | 1.716545  | 1.205292  | 0.677908  |
| Q6r3     | -0.34912  | 1.476012  | -0.11424  | 0.288967  | -0.14202  | 0.242393  |
| Q6r4     | 0.199466  | -0.31854  | 0.445499  | -0.10014  | 0.303727  | -0.70099  |
| Q6r5     | 0.744699  | 0.811145  | 2.221832  | 0.924717  | 1.816574  | 0.888146  |
| Q6r6     | 2.533852  | 3.151418  | 2.994294  | 3.831478  | 2.709637  | 2.898771  |
| Q6r7     | -0.8026   | -0.74654  | 0.536385  | 1.582484  | 1.608436  | 0.779205  |
| Q6r8     | 1.614077  | 2.471479  | 1.703095  | 3.434642  | 3.35924   | 2.119073  |
| Q7\_1    | 4.355944  | 2.841651  | 2.892291  | 2.701459  | 8.635566  | 3.029478  |
| Q7\_2    | 5.192119  | 3.852713  | 6.747642  | 4.150208  | 7.229909  | 6.292859  |
| Q7\_3    | 6.484115  | 3.834943  | 5.194257  | 3.909137  | 7.336505  | 6.230936  |
| Q7\_4    | 10.10111  | 8.389435  | 8.793659  | 8.273802  | 11.76445  | 9.247538  |
| Q7\_5    | 7.233676  | 4.839024  | 5.790385  | 4.935673  | 7.286002  | 6.962825  |
| Q7\_6    | 4.139474  | 2.521358  | 2.951169  | 2.419919  | 4.412424  | 3.515856  |
| Q7\_7    | 7.100123  | 5.871531  | 6.371467  | 5.694119  | 8.189354  | 6.602987  |
| Q7\_8    | 3.507806  | 1.942855  | 2.75205   | 1.609356  | 4.081044  | 2.854012  |
| Q7\_9    | 5.909435  | 5.221959  | 5.524882  | 5.058041  | 5.911755  | 5.456515  |
| Q7\_10   | 4.395043  | 4.220313  | 5.296106  | 4.197766  | 5.1035    | 4.479072  |
| Q7\_11   | 5.677674  | 5.359456  | 5.462184  | 5.800696  | 5.998446  | 5.321294  |
| Q7\_12   | 3.522429  | 3.848249  | 3.210613  | 4.142624  | 3.987704  | 4.057838  |

| Variable | Segment 1 | Segment 2 | Segment 3 | Segment 4 | Segment 5 | Segment 6 |
| -------- | --------- | --------- | --------- | --------- | --------- | --------- |
| Constant | -116.299  | -123.014  | -121.593  | -125.905  | -117.135  | -126.279  |

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.metaforms.ai/survey-programming-decipher/complexity-support/segmentation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
