Poisson Regression in R Programming Last Updated : 10 May, 2020 Summarize Comments Improve Suggest changes Share Like Article Like Report A Poisson Regression model is used to model count data and model response variables (Y-values) that are counts. It shows which X-values work on the Y-value and more categorically, it counts data: discrete data with non-negative integer values that count something. In other words, it shows which explanatory variables have a notable effect on the response variable. Poisson Regression involves regression models in which the response variable is in the form of counts and not fractional numbers. Mathematical Equation: log(y) = a + b1x1 + b2x2 + bnxn..... Parameters: y: This parameter sets as a response variable. a and b: The parameter a and b are the numeric coefficients. x: This parameter is the predictor variable. Creating Poisson Regression Model The function used to create the Poisson regression model is the glm() function. Syntax: glm(formula, data, family) Parameters: formula: This parameter is the symbol presenting the relationship between the variables. data: The parameter is the data set giving the values of these variables. family: This parameter R object to specify the details of the model. It's value is 'Poisson' for Logistic Regression. Example: Approach: To understand how we can create: We use the data set "warpbreaks". Considering "breaks" as the response variable. The wool "type" and "tension" are taken as predictor variables. Code: Python3 input <- warpbreaks print(head(input)) Output: Create Regression Model Approach: Creating the poisson regression model: Take the parameters which are required to make model. let's use summary() function to find the summary of the model for data analysis. Example: Python3 output <-glm(formula = breaks ~ wool + tension, data = warpbreaks, family = poisson) print(summary(output)) Output: Creating Poisson Regression Model using glm() function Approach: Creating the regression model with the help of the glm() function as: With the help of this function, easy to make model. Now we draw a graph for the relation between "formula", "data" and "family". Example: Python3 output_result <-glm(formula = breaks ~ wool + tension, data = warpbreaks, family = poisson) output_result Output: Comment More infoAdvertise with us Next Article Poisson Regression in R Programming S shivanisinghss2110 Follow Improve Article Tags : Python R Language Practice Tags : python Similar Reads Lasso Regression in R Programming Lasso regression is a classification algorithm that uses shrinkage in simple and sparse models(i.e models with fewer parameters). In Shrinkage, data values are shrunk towards a central point like the mean. Lasso regression is a regularized regression algorithm that performs L1 regularization which a 11 min read Polynomial Regression in R Programming Polynomial Regression is a form of linear regression in which the relationship between the independent variable x and dependent variable y is modeled as an nth degree polynomial. Polynomial regression fits a nonlinear relationship between the value of x and the corresponding conditional mean of y, d 4 min read Regression Analysis in R Programming Regression analysis is a statistical method used to determine the relationship between a dependent variable and one or more independent variables. Regression analysis is commonly used for prediction, forecasting and determining relationships between variables. In R, there are several types of regres 4 min read Regression and its Types in R Programming Regression analysis is a statistical tool to estimate the relationship between two or more variables. There is always one response variable and one or more predictor variables. Regression analysis is widely used to fit the data accordingly and further, predicting the data for forecasting. It helps b 5 min read Decision Tree for Regression in R Programming A decision tree is a machine learning algorithm used to predict continuous values (regression) or categories (classification). In regression, a decision tree is used when the dependent variable is continuous, like predicting car mileage based on engine power.Working of Decision Tree Algorithm of Reg 4 min read Like