The input table, glm_tempdamage, has 22 observations with one numerical predictor variable (temp) and one response variable (damage). The value of the response variable shows whether there is damage due to temperature (1 means yes, 0 means no).
id | temp | damage |
---|---|---|
1 | 53 | 1 |
2 | 57 | 1 |
3 | 58 | 1 |
4 | 63 | 1 |
5 | 66 | 0 |
6 | 67 | 0 |
7 | 67 | 0 |
8 | 67 | 0 |
9 | 68 | 0 |
10 | 69 | 0 |
11 | 70 | 1 |
12 | 70 | 0 |
13 | 70 | 1 |
14 | 70 | 0 |
15 | 72 | 0 |
16 | 73 | 0 |
17 | 75 | 0 |
18 | 75 | 1 |
19 | 76 | 0 |
20 | 76 | 0 |
21 | 78 | 0 |
22 | 79 | 0 |
Because this is a binary outcome, the two models use GLM with logistic regression. SQL-MapReduce Call 1 generates a model using the predictor variable (the second table in its Output section). SQL-MapReduce Call 2 generates the null model (the second table in its Output section). The null model is produced with only the intercept. SQL-MapReduce Call 3 uses the LRTEST function to compare the two GLM models.