Today: Lab 9ab due after lecture: CEQ Monday: Quizz 11: review Wednesday: Guest lecture – Multivariate Analysis Friday: last lecture: review – Bring questions DEC 8 – 9am FINAL EXAM EN 2007
Biology 4605 / 7220Name ________________ Quiz #10a19 November What are the 2 main differences between general linear models and generalized linear models? 2. A generalized linear model links a response variable to one or more explanatory variables Xi according to a link function.
Biology 4605 / 7220Name ________________ Quiz #10a19 November What are the 2 main differences between general linear models and generalized linear models? Most common answers: A. Non –normal ε B. ANODEV instead of ANOVA table C. Link function 2. A generalized linear model links a response variable to one or more explanatory variables Xi according to a link function. conceptual implementation
GLM, GzLM, GAM A few concepts and ideas
GLM Model based statistics – we define the response and the explanatory without worrying about the name of the test
GLM t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA GENERAL LINEAR MODELS ε ~ Normal R: lm()
GLM An example from Lab 9
GLM Do fumigants (treatments) decrease the number of wire worms? #ww = β 0 + β treatment treatment + β row row + β column column treatment fixed row random column random N=25
GLM N=25
GLM N=25
GLM N=25
GLM N=25
GLM p-value borderline Normality assumption not met
GLM N=25 p-value borderline Normality assumption not met n<30 Given that we do not violate the homogeneity assumption, randomizing will likely not change our decision… or will it? Let’s try p rand = ( randomizations)
GLM Parameters: Means with 95% CI Anything wrong with this analysis?
GLM Response variable? Counts
GzLM Poisson error #ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column
GzLM Poisson error #ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column ALL fits > 0
GzLM Poisson error
t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA Poisson Binomial Negative Binomial Gamma Multinomial GENERALIZED LINEAR MODELS Inverse Gaussian Exponential GENERAL LINEAR MODELS ε ~ Normal Linear combination of parameters R: lm() R: glm() GzLM
#ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column Generalized linear models have 3 components: Systematic Random Link function
GzLM #ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column Generalized linear models have 3 components: Systematic linear predictor Random Link function
GzLM #ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column Generalized linear models have 3 components: Systematic linear predictor Random probability distribution poisson error Link function
GzLM #ww = e μ + ε μ = β 0 + β treatment treatment + β row row + β column column Generalized linear models have 3 components: Systematic linear predictor Random probability distribution poisson error Link function log
GzLM
GLM An example from Lab 6
GLM Do movements of juvenile cod depend on time of day? distance = β 0 + β period period period categorical
GLM
Anything wrong with this analysis?
GAM
t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA Poisson Binomial Negative Binomial Gamma Multinomial GENERALIZED LINEAR MODELS Inverse Gaussian Exponential Non-linear effect of covariates GENERALIZED ADDITIVE MODELS GENERAL LINEAR MODELS ε ~ Normal Linear combination of parameters R: lm() R: glm() R: gam() GAM
Generalized case of generalized linear models where the systematic component is not necessarily linear distance ~ s(period) y ~ s(x 1 ) + s(x 2 ) + x 3 + …. s: smooth function Spline functions are concerned with good approximation of functions over the whole of a region, and behave in a stable manner
GAM Smoothing - concept
Degree of smoothness -+ GAM How much smoothing?
GAM
t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA GENERAL LINEAR MODELS ε ~ Normal R: lm()
t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA Poisson Binomial Negative Binomial Gamma Multinomial GENERALIZED LINEAR MODELS Inverse Gaussian Exponential GENERAL LINEAR MODELS ε ~ Normal Linear combination of parameters R: lm() R: glm() Non-normal ε Link function
t-test ANOVA Simple Linear Regression Multiple Linear Regression ANCOVA Poisson Binomial Negative Binomial Gamma Multinomial GENERALIZED LINEAR MODELS Inverse Gaussian Exponential Non-linear effect of covariates GENERALIZED ADDITIVE MODELS GENERAL LINEAR MODELS ε ~ Normal Linear combination of parameters R: lm() R: glm() R: gam() Linear predictor involves sums of smooth functions of covariates