In: Statistics and Probability
what regression model code is better to identify wine quality in r
Logistic Regression model can be used to identify the wine quality.
Logistic regression model is used when the depenedent variable is dichotomous. Here wine quality can be considered as dichotomous variable.
We can define 0 if quality of wine is 'bad' and 1 if quality of wine is 'good'. If there is only one independent variable that define the quality of wine then it is simple logistic regression and if there are more than one variables that define the quality of wine then it is multiple logistic regression.
# Function available in R for logistic regression is 'glm'.
example: let x1, x2 and x3 are the independent variables that defines the quality of wine. Then glm in R can be used as-
> model <- glm(wine_quality~ x1+x2+x3, data=wine_data, family="binomial")
here wine_quality is dependent variable, wine_data is name of the data set and family ="binomial" will tell R to perform logistic regression.