Logistic Regression Algorithm
In regression analysis, logistic regression (or logit regression) is estimate the parameters of a logistic model (a form of binary regression). Outputs with more than two values are modelled by polynomial logistic regression and, if the multiple category are ordered, by ordinal logistic regression (for example the proportional odds ordinal logistic model). However, the development of the logistic model as a general option to the probit model was chiefly due to the work of Joseph Berkson over many tens, beginning in Berkson (1944), where he coined" logit", by analogy with" probit", and continuing through Berkson (1951) and following years.
The probit model was chiefly used in bioassay, and had been preceded by earlier work dating to 1860; see Probit model § history. The logistic function was developed as a model of population increase and named" logistic" by Pierre François Verhulst in the 1830s and 1840s, under the guidance of Adolphe Quetelet.
# Introduction to logistic regression
# glm stands for Generalized Linear Model
mod1 <- glm(y_data~x_data, data=name_of_the_dataframe, family="binomial")
# displays the output of the model computed by the previous line
summary(mod1)
# modeled data : it predicts the output for x_test_data as input information for the model
predicted <- predict(mod1, x_test_data)