This post deals with the general linear model, related assumptions, the transformations required to apply linear regression to non-linear data, and the steps required to perform linear regression in the R language.
Generalized linear models (GLM) was proposed by Nelder and Baker (1972). GLM utilize a weighted least squares approach to find a weighting function that minimizes error. GLM have been implemented in R and are accessed using the glm function (Rodriguez, 2017). GLM rely on the specification of a family of model, such as Gaussian, binomial, Poisson, Gamma, and quasi. The idea is to make finding a fit for a generalized linear model as simple as finding a fit for an ordinary linear model.
GLM relies on several assumptions (Anonymous, 2017). For example, GLM assumes that the Y values are independently distributed. The distribution need not be normal, but should be exponential. The fit errors need to be independent, but also need not be normal.
Data can be transformed to allow linear regression (King, 2016). For example, if the relationship between two variables is logarithmic we can use the log function to transform the values. The lm function can be invoke supplying the transformation function. For example, the command lm(log(period) ~ log(dist), data = planets).
References
Anonymous. (2017). Introduction to Generalized Linear Models. Retrieved from https://onlinecourses.science.psu.edu/stat504/node/216
King, W. B. (2016). R Tutorials: Simple nonlinear regression. Retrieved from https://ww2.coastal.edu/kingw/statistics/R-tutorials/simplenonlinear.html
Nelder, J. A., & Baker, R. J. (1972). Generalized linear models. Encyclopedia of statistical sciences.
Rodriguez, G. (2017). Introducing R: Generalized Linear Models. Retrieved from http://data.princeton.edu/R/glms.html
No comments:
Post a Comment