Description Usage Arguments Details
Deviance from predicted values of a logit model
1 |
y |
vector of the outcome that was regressed on, or the true values to predict |
xb |
estimates from the logit model, before the link function is applied. |
phat |
estimates from the logit model, after link function is applied.
Only either |
w |
survey weights if appplicable |
The deviance without weights, dev(\hat p) for target y is computed as
-2 \times ∑_{i=1}^n y_i \log(\hat{p_i}) + (1 - y_i) \log(1 - \hat{p_i})
where
\hat{p} = \frac{\exp{(Xβ)}}{\exp{(Xβ)} + 1}
.
With weights, this simply becomes
-2 \times ∑_{i=1}^n w_i y_i \log(\hat{p_i}) + w_i (1 - y_i) \log(1 - \hat{p_i})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.