1 / 18

GLMs

GLMs. Before we talk about GENERALIZED Linear Models (GLMS), we need to talk about GENERAL Linear Models (not-GLMs but sound really similar). Linear Model. - residual or error. Formal Definition. , - observed values of covariate variables (i.e. temperature, precipitation)

tnewman
Download Presentation

GLMs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GLMs • Before we talk about GENERALIZED Linear Models (GLMS), we need to talk about GENERAL Linear Models (not-GLMs but sound really similar).

  2. Linear Model - residual or error

  3. Formal Definition • ,- observed values of covariate variables (i.e. temperature, precipitation) • - observed value of the response variable (i.e. tree height) • - y intercept:

  4. General Linear Model

  5. General Linear Model

  6. General Linear Model • Can transform the predictor values to linearize the relationship between the predictors and the response • Residuals do need to be from a normal distribution • Uses least squares to fit the model

  7. Polynomial Regression

  8. Need More • Not all phenomenon follow linear response • Not all residuals are normally distributed • This leads to: • GLMs: Single function, specified regression distribution • GAMs: Multiple functions • “Non-parametric” approaches: no assumptions are made about the parameters of the distribution

  9. GLM • Generalized Linear Model • Not to be confused with a general linear model • Allows a linear model to be related to the response variable via a “Link” function. • Residuals do not have to be normally distributed • Also requires to be from a defined probability distribution • Fit is based on maximum likelihood

  10. Generalized Linear Models • - a random variable with some probability distribution • Related to the response values • - error • Residuals • Linear model without the intercept • - Expected value of • Predicted value (no error)

  11. Generalized Linear Models • Linear model without the error • is a “link” function • = ) • Random component is from a known probability distribution

  12. Common Functions in R • Probability Distribution (Link Function) • Binomial (link = "logit") • True/false, alive/dead, present/absent • Gaussian (link = "identity") • Continuous, normal • Gamma (link = "inverse") • Seed distribution, distance from… • Poisson (link = "log") • Counts

  13. Normal Distribution AKA “Gaussian” Distribution Wikipedia

  14. Binomial Number of successes of yes/no experiments Wikipedia

  15. Poisson Number of events in time T, k=number of occurrences Wikipedia

  16. Gamma Distribution Wait times, seed distribution, etc. Wikipedia

  17. Deviance • Where: • = Maximum log-likelihood for model • = Maximum log-likelihood for the most complex model possible (i.e. fits observed data perfectly)

  18. Degrees of Freedom • number of observations • number of parameters • Degrees of freedom =

More Related