output: html_document: toc: true # Gera um sumário (table of contents) toc_depth: 2 # Limita o nível de subtítulos no sumário —

#Escolas abaixo e acima da média geral do IDEB

## Média IDEB: 4.58
## 
## Não Atingiu     Atingiu 
##   0.5092713   0.4907287

#Regressão Logística (Média IDEB ~ SAEB Protuguês + SAEB Matemática + Taxa de Aprovação + Tipo de Rede de Ensino)

## 
## Call:
## glm(formula = atingiuMediaIdeb ~ nota_saeb_lingua_portuguesa + 
##     nota_saeb_matematica + taxa_aprovacao + rede, family = binomial, 
##     data = dados)
## 
## Coefficients:
##                               Estimate Std. Error  z value Pr(>|z|)    
## (Intercept)                 -3.367e+01  8.210e-02 -410.064   <2e-16 ***
## nota_saeb_lingua_portuguesa -5.344e-02  3.464e-04 -154.259   <2e-16 ***
## nota_saeb_matematica         9.021e-02  4.107e-04  219.644   <2e-16 ***
## taxa_aprovacao               2.660e-01  6.842e-04  388.704   <2e-16 ***
## redefederal                  1.422e+00  1.528e-01    9.306   <2e-16 ***
## redemunicipal                1.047e+00  8.165e-03  128.234   <2e-16 ***
## redeprivada                 -4.054e-01  1.614e-01   -2.512    0.012 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 977500  on 705291  degrees of freedom
## Residual deviance: 495936  on 705285  degrees of freedom
##   (459215 observations deleted due to missingness)
## AIC: 495950
## 
## Number of Fisher Scoring iterations: 6

#Regressão Logistica expressa em tabela (a partir do pacote gtsummary)

Characteristic log(OR)1 95% CI1 p-value
Nota SAEB Língua Portuguesa -0.05 -0.05, -0.05 <0.001
Nota SAEB Matemática 0.09 0.09, 0.09 <0.001
Taxa de Aprovação 0.27 0.26, 0.27 <0.001
rede


    estadual
    federal 1.4 1.1, 1.7 <0.001
    municipal 1.0 1.0, 1.1 <0.001
    privada -0.41 -0.71, -0.08 0.012
1 OR = Odds Ratio, CI = Confidence Interval

#Gráfico dos coeficientes

#Tabela com Odds Ratios a partir dos coeficientes do modelo

Characteristic OR1 95% CI1 p-value
Nota SAEB Língua Portuguesa 0.95 0.95, 0.95 <0.001
Nota SAEB Matemática 1.09 1.09, 1.10 <0.001
Taxa de Aprovação 1.30 1.30, 1.31 <0.001
Tipo de Rede


    estadual
    federal 4.15 3.09, 5.63 <0.001
    municipal 2.85 2.80, 2.90 <0.001
    privada 0.67 0.49, 0.92 0.012
1 OR = Odds Ratio, CI = Confidence Interval