390 likes | 581 Views
DEC 8 – 9am FINAL EXAM EN 2007. Today: Lab 9ab due after lecture: CEQ Monday: Quizz 11: review Wednesday: Guest lecture – Multivariate Analysis Friday: last lecture: review – Bring questions. Biology 4605 / 7220 Name ________________ Quiz #10a 19 November 2012
E N D
DEC 8 – 9am FINAL EXAMEN 2007 Today: Lab 9ab due after lecture: CEQ Monday: Quizz 11: review Wednesday: Guest lecture – Multivariate Analysis Friday: last lecture: review – Bring questions
Biology 4605 / 7220 Name ________________ • Quiz #10a 19 November 2012 • 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 / 7220 Name ________________ • Quiz #10a 19 November 2012 • 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. implementation conceptual
GLM Model based statistics – we define the response and the explanatory without worrying about the name of the test
GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA GLM
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 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 prand = 0.0626 (50 000 randomizations) N=25
GLM Parameters: Means with 95% CI Anything wrong with this analysis?
GLM Response variable? Counts
GzLMPoisson error #ww = eμ+ ε μ = β0 + βtreatment treatment + βrow row + βcolumn column
GzLMPoisson error #ww = eμ+ ε μ = β0 + βtreatment treatment + βrow row + βcolumn column ALL fits > 0
GENERALIZED LINEAR MODELS Linear combination of parameters R: glm() Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian GzLM
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
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?
GENERALIZED ADDITIVE MODELS R: gam() GENERALIZED LINEAR MODELS Linear combination of parameters R: glm() Non-linear effect of covariates Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian GAM
GAM Generalized case of generalized linear models where the systematic component is not necessarily linear distance ~ s(period) y ~ s(x1) + s(x2) + x3 + …. 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
GAM How much smoothing? - + Degree of smoothness
GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA
GENERALIZED LINEAR MODELS Non-normal ε Link function Linear combination of parameters R: glm() Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian
Linear predictor involves sums of smooth functions of covariates GENERALIZED ADDITIVE MODELS R: gam() GENERALIZED LINEAR MODELS Linear combination of parameters R: glm() Non-linear effect of covariates Multinomial Binomial Poisson GENERAL LINEAR MODELS ε ~ Normal R: lm() ANOVA Multiple Linear Regression t-test Simple Linear Regression ANCOVA Exponential Gamma Negative Binomial Inverse Gaussian