Created
December 1, 2023 22:05
-
-
Save DATAUNIRIO/da0f0744b16fa2dc2e5b29436457d239 to your computer and use it in GitHub Desktop.
anotações para aula
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variável resposta: | |
hon, indicando se um aluno está em uma turma de elite ou não. | |
variável explicativa: | |
gênero indicando se é do sexo feminino ou não | |
table(sample$hon) | |
49/151 | |
151/49 | |
chance = P/(1-P) | |
probabilidade = P/(P + 1-P) | |
chance_iguais = 1/1 ou 50/50 | |
em probabilidade temos 0,5 | |
chance_de_um_para_tres = 1/3 | |
probabilidade_relacionada = 1/(1+3) | |
chance_de_tres_para_um = 3/1 | |
probabilidade_relacionada = 3/(1+3) | |
library(readr) | |
sample <- read_csv("C:/Users/08451589707/Downloads/sample.csv") | |
View(sample) | |
names(sample) | |
modelo = glm(hon~female,family = binomial, data=sample) | |
summary(modelo) | |
exp(coefficients(modelo)) | |
table(sample$hon,sample$female) | |
odds_mulher = 32/77 | |
odds_homem = 17/74 | |
odds_mulher/odds_homem | |
escola = sample | |
colnames(escola) = c('sexo','leitura','escrita', 'matematica', 'elite','interacao_fem_mat') | |
attr(escola$sexo,'categoria') = c('0 = Masculino',"1 = Feminino") | |
attr(escola$elite,'categoria') = c('0 = Não elite',"1 = Elite") | |
attributes(escola$elite) | |
https://stats.oarc.ucla.edu/other/mult-pkg/faq/general/faq-how-do-i-interpret-odds-ratios-in-logistic-regression/ | |
http://www.sthda.com/english/articles/36-classification-methods-essentials/151-logistic-regression-essentials-in-r/#computing-logistic-regression | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment