Linear Models -- Foundation. What Type of Variable? 1.Temperature ( o F) 2.Habitat complexity (low, medium, high) 3.Home range size (m 2 ) 4.Brood size.

Slides:



Advertisements
Similar presentations
Qualitative predictor variables
Advertisements

BPS - 5th Ed. Chapter 241 One-Way Analysis of Variance: Comparing Several Means.
Chapter 11 Analysis of Variance
Chapter 14, part D Statistical Significance. IV. Model Assumptions The error term is a normally distributed random variable and The variance of  is constant.
PSY 307 – Statistics for the Behavioral Sciences
Copyright ©2006 Brooks/Cole, a division of Thomson Learning, Inc. Analysis of Variance Chapter 16.
Generalized Linear Models (GLM)
ANOVA: ANalysis Of VAriance. In the general linear model x = μ + σ 2 (Age) + σ 2 (Genotype) + σ 2 (Measurement) + σ 2 (Condition) + σ 2 (ε) Each of the.
Lesson #23 Analysis of Variance. In Analysis of Variance (ANOVA), we have: H 0 :  1 =  2 =  3 = … =  k H 1 : at least one  i does not equal the others.
Chapter 3 Analysis of Variance
Lecture 9: One Way ANOVA Between Subjects
ANOVA  Used to test difference of means between 3 or more groups. Assumptions: Independent samples Normal distribution Equal Variance.
Copyright © 2014 by McGraw-Hill Higher Education. All rights reserved.
Statistics for the Social Sciences
Business 205. Review Survey Designs Survey Ethics.
Intro to Statistics for the Behavioral Sciences PSYC 1900
Hypothesis tests for slopes in multiple linear regression model Using the general linear test and sequential sums of squares.
Chap 10-1 Analysis of Variance. Chap 10-2 Overview Analysis of Variance (ANOVA) F-test Tukey- Kramer test One-Way ANOVA Two-Way ANOVA Interaction Effects.
64 HR (bpm) Does posture affect HR? Effects of posture lyingsittingstanding.
Review of Statistics Group Results. Which type of statistics? When comparing two group scores-Use the t-test. When comparing more than two scores: Use.
1 of 46 MGMT 6970 PSYCHOMETRICS © 2014, Michael Kalsher Michael J. Kalsher Department of Cognitive Science Inferential Statistics IV: Factorial ANOVA.
1 1 Slide © 2007 Thomson South-Western. All Rights Reserved Chapter 13 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple Coefficient of Determination n Model Assumptions n Testing.
t-tests Quantitative Data One group  1-sample t-test
1 1 Slide © 2008 Thomson South-Western. All Rights Reserved Chapter 15 Multiple Regression n Multiple Regression Model n Least Squares Method n Multiple.
1 1 Slide Simple Linear Regression Coefficient of Determination Chapter 14 BA 303 – Spring 2011.
Multivariate Analysis. One-way ANOVA Tests the difference in the means of 2 or more nominal groups Tests the difference in the means of 2 or more nominal.
Sociology 680 Multivariate Analysis: Analysis of Variance.
Business Statistics, A First Course (4e) © 2006 Prentice-Hall, Inc. Chap 10-1 Chapter 10 Two-Sample Tests and One-Way ANOVA Business Statistics, A First.
Lecture 8 Simple Linear Regression (cont.). Section Objectives: Statistical model for linear regression Data for simple linear regression Estimation.
PCB 3043L - General Ecology Data Analysis. OUTLINE Organizing an ecological study Basic sampling terminology Statistical analysis of data –Why use statistics?
One-Way Analysis of Variance
Copyright © 2013, 2009, and 2007, Pearson Education, Inc. Chapter 13 Multiple Regression Section 13.3 Using Multiple Regression to Make Inferences.
Chapter 13 Multiple Regression
Lecture 9-1 Analysis of Variance
Previous Lecture: Phylogenetics. Analysis of Variance This Lecture Judy Zhong Ph.D.
1 ANALYSIS OF VARIANCE (ANOVA) Heibatollah Baghi, and Mastee Badii.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Multivariate Analysis: Analysis of Variance
Lecturer’s desk INTEGRATED LEARNING CENTER ILC 120 Screen Row A Row B Row C Row D Row E Row F Row G Row.
The general linear test approach to regression analysis.
PCB 3043L - General Ecology Data Analysis.
Chapter 4 Analysis of Variance
Copyright © 2010, 2007, 2004 Pearson Education, Inc. All Rights Reserved Lecture Slides Elementary Statistics Eleventh Edition and the Triola.
IE241: Introduction to Design of Experiments. Last term we talked about testing the difference between two independent means. For means from a normal.
Copyright © 2016, 2013, 2010 Pearson Education, Inc. Chapter 10, Slide 1 Two-Sample Tests and One-Way ANOVA Chapter 10.
Linear Models Simple Linear Regression. 2 Recall from Introductory Stats Slope –rate of change of the response for each unit increase of the explanatory.
Introduction to ANOVA Research Designs for ANOVAs Type I Error and Multiple Hypothesis Tests The Logic of ANOVA ANOVA vocabulary, notation, and formulas.
T-tests Quantitative Data One group  1-sample t-test Two independent groups  2-sample t-test Two dependent groups  Matched Pairs t-test t-TestsSlide.
1 1 Slide The Simple Linear Regression Model n Simple Linear Regression Model y =  0 +  1 x +  n Simple Linear Regression Equation E( y ) =  0 + 
Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc.Chap 14-1 Statistics for Managers Using Microsoft® Excel 5th Edition Chapter.
Analysis of Variance 11/6. Comparing Several Groups Do the group means differ? Naive approach – Independent-samples t-tests of all pairs – Each test doesn't.
While you wait: Enter the following in your calculator. Find the mean and sample variation of each group. Bluman, Chapter 121.
Copyright © Cengage Learning. All rights reserved. 12 Analysis of Variance.
Jump to first page Inferring Sample Findings to the Population and Testing for Differences.
Formula for Linear Regression y = bx + a Y variable plotted on vertical axis. X variable plotted on horizontal axis. Slope or the change in y for every.
Stat 112 Notes 8 Today: –Chapters 4.3 (Assessing the Fit of a Regression Model) –Chapter 4.4 (Comparing Two Regression Models) –Chapter 4.5 (Prediction.
Université d’Ottawa / University of Ottawa 2001 Bio 4118 Applied Biostatistics L12.1 Lecture 12: Generalized Linear Models (GLM) What are they? When do.
The 2 nd to last topic this year!!.  ANOVA Testing is similar to a “two sample t- test except” that it compares more than two samples to one another.
INTRODUCTION TO MULTIPLE REGRESSION MULTIPLE REGRESSION MODEL 11.2 MULTIPLE COEFFICIENT OF DETERMINATION 11.3 MODEL ASSUMPTIONS 11.4 TEST OF SIGNIFICANCE.
Chapter 11 Analysis of Variance
Chapter 10 Two-Sample Tests and One-Way ANOVA.
Chapter 10 Two-Sample Tests and One-Way ANOVA.
Chapter 11 Analysis of Variance
What if. . . You were asked to determine if psychology and sociology majors have significantly different class attendance (i.e., the number of days.
Analysis of Variance ANOVA.
Statistics for the Social Sciences
Multivariate Analysis: Analysis of Variance
Multivariate Analysis: Analysis of Variance
Presentation transcript:

Linear Models -- Foundation

What Type of Variable? 1.Temperature ( o F) 2.Habitat complexity (low, medium, high) 3.Home range size (m 2 ) 4.Brood size 5.Forest type (deciduous, mixed, coniferous) 6.Number of docks (on a lake shoreline) 7.Ecoregion (Northern Lakes & Forests, North Central Hardwood Forests, Driftless Area, Southeastern Wisconsin Till Plains, Central Corn Belt Plains) 8.Survived (yes, no) 9.Age (years) 10.Race LM Foundation 2

Which is the response variable? 1.Can length be used to predict weight? 2.How is weight affected by typical daily ration? 3.Does metabolic rate differ by sex of rabbit? 4.Is gas mileages significantly affected by weight of the car? 5.Is there a relationship between how much money a person makes and their satisfaction with deer harvest regulations? 6.How is the uptake of heavy metals affected by the sex and age (young, middle, old) of the individual? 7.Is there a relationship between how much money a person makes and how much they weigh? LM Foundation 3

4 Linear Models A categorization scheme All use a common foundation of theory Factor 2 Factors

Which Test? Why? 1.Does bird species diversity (number of species) decline as you move away from the equator (increase latitude)? 2.Does the mean length of the anterior adductor muscle scar on a mussel species differ among five locations? 3.Does whether or not an otter captures a bluegill depend on the total length of the bluegill? 4.Is there a difference in fat reserves (thickness in mm) between wild and domestic seals, sex of the seal, or the interaction between the seal type and sex? 5.Does the relationship between the number of times the word gender was used in a journal volume and the year of the volume differ among three different journals? LM Foundation 5

Which Test? Why? 1.Does the relationship between resting heart rate and body weight differ among groups of subjects that had or had not ingested caffeine? 2.Does the mean alcohol by volume differ among five different types of beer (pale ales, IPAs, lagers, stouts, and porters)? 3.Does mean alcohol by volume change depending on the weight of malt extract used in the brewing process? LM Foundation 6

7 Which Test? Why?

LM Foundation 8 Which Test? Why?

LM Foundation 9 Which Test? Why?

LM Foundation 10 Example Data – Sex & Direction A sample of 30 males and 30 females was taken to an unfamiliar wooded park and given spatial orientation tests, including pointing to the south. The absolute pointing error, in degrees, was recorded. The results are in the SexDirection.txt file on the webpage. Is there a difference in sense of direction between men and women? from Sholl, M.J., J.C. Acacio, R.O. Makar, and C. Leon The relation of sex and sense of direction to spatial orientation in an unfamiliar environment. Journal of Environmental Psychology. 20:17-28.

LM Foundation 11 Example Data – Sex & Direction What are the hypotheses? –H O :  m -  f =0 H A :  m -  f ≠ 0 Use which hypothesis test? –Two Sample T-test What is conclusion from handout? –No significant difference in mean APE between males and females

Competing Models LM Foundation 12 CharacteristicFull ModelSimple Model More Less BetterWorse Relative Fit # Parameters Hypothesis HAHA H0H0

Competing Models LM Foundation 13 FullSimple More Less BetterWorse HAHA H0H0

LM Foundation 14 Competing Models – 2-sample T H 0 :  i =  –“The mean for each group equals a single grand mean” i.e., “No difference in group means”

LM Foundation 15 Competing Models – 2-sample T H A :  i =  i (where  1 ≠  2 ) –“Each group mean equals a different value” i.e., “Difference in group means”

Competing Models 16 CharacteristicFull ModelSimple Model More Less BetterWorse Relative Fit # Parameters Hypothesis HAHA H0H0 Is the “benefit” of a better fit worth the “cost” of added complexity?

Measuring Fit

LM Foundation 18 Measuring Fit – Notation Y ij = Y measurement on individual j in group i I = total number of groups n i = number of individuals in group i n = number of individuals in all groups  Y i. = group i sample mean (i.e., group mean)  Y.. = sample mean of all individuals (i.e., grand mean)

LM Foundation 19 Measuring Fit – Notation Examples i th Group Sample MeanGrand Sample Mean

LM Foundation 20 Measuring Fit – SS Measures lack-of-fit of a model to a set of data

LM Foundation 21 Measuring Fit – SS Total = datamodel

Measuring Fit – SS Within = datamodel

LM Foundation 23 Measuring Fit – SS Within & SS Total SS Total = SS Within = Full model ALWAYS fits better!

LM Foundation 24 Measuring Fit – SS Total Partitions SS Total = SS Within + SS Among where –Difference in SS between full & simple models –Improvement in lack-of-fit when using full model (rather than simple model) –Measure of how different the group means are

LM Foundation 25 Measuring Fit – SS Among What would make SS among be “large”? Must not forget about differences in model complexity!

LM Foundation 26 Measuring Complexity df = n – number of predictions – “Simple model”  df Total = n-1 – “Full model”  df Within = n- I df Total = df Within + df Among df Among = I -1 –Difference in number of model parameters –Added complexity of full model

LM Foundation 27 Factor out difference in number of parameters on fit calculation by dividing SS by df Result is “mean square” (MS) MS are sample variances –MS Total = s 2 = total variability among individuals around grand mean –MS Within = s p 2 = pooled variability among individuals around group means –MS Among = variability of group means around the grand mean Fit vs. Complexity

LM Foundation 28 Fit vs. Complexity – MS Suppose that MS Among = 10 –Is this “large” if MS Within = 100? –Is this “large” if MS Within = 1? F=

LM Foundation 29 Fit vs Complexity – F Distribution Has numerator and denominator df –numerator from df Among –denominator from df Within Right-skewed, all positive numbers P-value always upper tail

Fit vs. Complexity – p-value Large p-value? Small F Small MS Among relative to MS Within Small SS Among Full model not “better” Group means do not differ LM Foundation 30

Fit vs. Complexity – p-value Small p-value? Large F Large MS Among relative to MS Within Large SS Among Full model is “better” Group means do differ LM Foundation 31 Large p-value? Small F Small MS Among relative to MS Within Small SS Among Full model not “better” Group means do not differ

32 Things To Remember Always two models –Full model is separate means for each group –Simple model is a single mean for each group The SS Total partitions into two parts -- SS Among +SS Within = SS Total –SS Among is the improvement in lack-of-fit using the full model MS are SS/df and are variances –MS Total is variance of Y –MS Within is the pooled common variance df Among is the increase in complexity of the full model MS Among + MS Within not = MS Total (because of different df) F is the ratio MS Among / MS Within If F is large then evidence for different means -- i.e., reject H 0

LM Foundation 33 Linear Models in R – HO Note use of –lm() –summary() –confint() –fitPlot() –anova()