MATH 3359 Introduction to Mathematical Modeling Project Multiple Linear Regression Multiple Logistic Regression.

Slides:



Advertisements
Similar presentations
Linear regression models in R (session 1) Tom Price 3 March 2009.
Advertisements

BA 275 Quantitative Business Methods
Logistic Regression Example: Horseshoe Crab Data
© The McGraw-Hill Companies, Inc., 2000 CorrelationandRegression Further Mathematics - CORE.
July 1, 2008Lecture 17 - Regression Testing1 Testing Relationships between Variables Statistics Lecture 17.
Some Terms Y =  o +  1 X Regression of Y on X Regress Y on X X called independent variable or predictor variable or covariate or factor Which factors.
Multiple Regression Predicting a response with multiple explanatory variables.
1 BA 275 Quantitative Business Methods Residual Analysis Multiple Linear Regression Adjusted R-squared Prediction Dummy Variables Agenda.
Examining Relationship of Variables  Response (dependent) variable - measures the outcome of a study.  Explanatory (Independent) variable - explains.
Nemours Biomedical Research Statistics April 2, 2009 Tim Bunnell, Ph.D. & Jobayer Hossain, Ph.D. Nemours Bioinformatics Core Facility.
Stat 112: Lecture 13 Notes Finish Chapter 5: –Review Predictions in Log-Log Transformation. –Polynomials and Transformations in Multiple Regression Start.
7/2/ Lecture 51 STATS 330: Lecture 5. 7/2/ Lecture 52 Tutorials  These will cover computing details  Held in basement floor tutorial lab,
MATH 3359 Introduction to Mathematical Modeling Linear System, Simple Linear Regression.
Introduction to Linear and Logistic Regression. Basic Ideas Linear Transformation Finding the Regression Line Minimize sum of the quadratic residuals.
C82MCP Diploma Statistics School of Psychology University of Nottingham 1 Linear Regression and Linear Prediction Predicting the score on one variable.
Simple Linear Regression Analysis
MATH 3359 Introduction to Mathematical Modeling Download/Import/Modify Data, Logistic Regression.
Checking Regression Model Assumptions NBA 2013/14 Player Heights and Weights.
1 1 Slide Simple Linear Regression Chapter 14 BA 303 – Spring 2011.
T-tests and ANOVA Statistical analysis of group differences.
Regression and Correlation Methods Judy Zhong Ph.D.
MAT 254 – Probability and Statistics Sections 1,2 & Spring.
7.1 - Motivation Motivation Correlation / Simple Linear Regression Correlation / Simple Linear Regression Extensions of Simple.
Lecture 4: Inference in SLR (continued) Diagnostic approaches in SLR BMTRY 701 Biostatistical Methods II.
1 Experimental Statistics - week 10 Chapter 11: Linear Regression and Correlation.
Lecture 3: Inference in Simple Linear Regression BMTRY 701 Biostatistical Methods II.
April 6 Logistic Regression –Estimating probability based on logistic model –Testing differences among multiple groups –Assumptions for model.
1 Prices of Antique Clocks Antique clocks are sold at auction. We wish to investigate the relationship between the age of the clock and the auction price.
Regression. Population Covariance and Correlation.
Logistic regression. Analysis of proportion data We know how many times an event occurred, and how many times did not occur. We want to know if these.
Inference for Regression Simple Linear Regression IPS Chapter 10.1 © 2009 W.H. Freeman and Company.
Regression Analysis Week 8 DIAGNOSTIC AND REMEDIAL MEASURES Residuals The main purpose examining residuals Diagnostic for Residuals Test involving residuals.
FACTORS AFFECTING HOUSING PRICES IN SYRACUSE Sample collected from Zillow in January, 2015 Urban Policy Class Exercise - Lecy.
Exercise 1 The standard deviation of measurements at low level for a method for detecting benzene in blood is 52 ng/L. What is the Critical Level if we.
Regression & Correlation. Review: Types of Variables & Steps in Analysis.
Business Statistics: A Decision-Making Approach, 6e © 2005 Prentice-Hall, Inc. Chap 13-1 Introduction to Regression Analysis Regression analysis is used.
Tutorial 4 MBP 1010 Kevin Brown. Correlation Review Pearson’s correlation coefficient – Varies between – 1 (perfect negative linear correlation) and 1.
Lecture 7: Multiple Linear Regression Interpretation with different types of predictors BMTRY 701 Biostatistical Methods II.
A preliminary exploration into the Binomial Logistic Regression Models in R and their potential application Andrew Trant PPS Arctic - Labrador Highlands.
Applied Statistics Week 4 Exercise 3 Tick bites and suspicion of Borrelia Mihaela Frincu
Lecture 6: Multiple Linear Regression Adjusted Variable Plots BMTRY 701 Biostatistical Methods II.
Lecture 6: Multiple Linear Regression Adjusted Variable Plots BMTRY 701 Biostatistical Methods II.
Linear Models Alan Lee Sample presentation for STATS 760.
Economics 173 Business Statistics Lecture 10 Fall, 2001 Professor J. Petry
© Department of Statistics 2012 STATS 330 Lecture 22: Slide 1 Stats 330: Lecture 22.
Linear Models Binary Logistic Regression. One-Way IVR 2 Hawaiian Bats Examine data.frame on HO Section 1.1 Questions –Is subspecies related to canine.
Tutorial 5 Thursday February 14 MBP 1010 Kevin Brown.
BPA CSUB Prof. Yong Choi. Midwest Distribution 1. Create scatter plot Find out whether there is a linear relationship pattern or not Easy and simple using.
Logistic Regression and Odds Ratios Psych DeShon.
1 Experimental Statistics - week 12 Chapter 11: Linear Regression and Correlation Chapter 12: Multiple Regression.
Lecturer: Ing. Martina Hanová, PhD.. Regression analysis Regression analysis is a tool for analyzing relationships between financial variables:  Identify.
Logistic Regression. What is the purpose of Regression?
BUSINESS MATHEMATICS & STATISTICS. Module 6 Correlation ( Lecture 28-29) Line Fitting ( Lectures 30-31) Time Series and Exponential Smoothing ( Lectures.
Introduction Many problems in Engineering, Management, Health Sciences and other Sciences involve exploring the relationships between two or more variables.
Lecture 11: Simple Linear Regression
Logistic regression.
A priori violations In the following cases, your data violates the normality and homoskedasticity assumption on a priori grounds: (1) count data  Poisson.
Chapter 12 Simple Linear Regression and Correlation
Résolution de l’ex 1 p40 t=c(2:12);N=c(55,90,135,245,403,665,1100,1810,3000,4450,7350) T=data.frame(t,N,y=log(N));T; > T t N y
CHAPTER 7 Linear Correlation & Regression Methods
Binary Logistic Regression
Correlation and regression
Checking Regression Model Assumptions
Regression Analysis Week 4.
Multiple Regression A curvilinear relationship between one variable and the values of two or more other independent variables. Y = intercept + (slope1.
Console Editeur : myProg.R 1
Chapter 12 Simple Linear Regression and Correlation
SAME THING?.
Obtaining the Regression Line in R
Adequacy of Linear Regression Models
Presentation transcript:

MATH 3359 Introduction to Mathematical Modeling Project Multiple Linear Regression Multiple Logistic Regression

Project Dataset: Any fields you are interested in, large sample size Methods: simple/multiple linear regression simple/multiple logistic regression Due on April 23 rd

Outline Multiple Linear Regression Introduction Make scatter plots of the data Fit multiple linear regression model Prediction Multiple Logistic Regression Introduction Fit multiple logistic regression model Exercise

Given a data set {y i, x i, i=1,…,n} of n observations, y i is dependent variable, x i is independent variable, the linear regression model is or where Recall: Simple Linear Regression

Given a data set of n observations, y i is dependent variable, are independent variables, the linear regression model is Multiple Linear Regression

Generally, we can do transformations for those x i ’s before plugging them in the model and they might not be independent with each other. 1. Transformations: 2. Dependent case: 3. Cross-Product Terms:

Example The data includes the selling price at auction of 32 antique grandfather clocks. The ages of the clocks and the number of people who mad a bid are also recorded in this dataset. AgeBiddersPrice

Recall: Scatter Plots — Function ‘plot’ plot (auction $ Age, auction $ Price, main= 'Relationship between Price and Age')

plot (auction $ Bidders, auction $ Price, main= 'Relationship between Price and Number of bidders')

plot ( auction )

Fit Multiple Linear Regression Model — Function ‘lm’ in R reg= lm ( formula, data ) summary ( reg ) In our example, reg= lm ( Price ~ Age + Bidders, data = auction )

> summary(reg) Call: lm(formula = Price ~ Age + Bidders, data = auction) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-08 *** Age e-14 *** Bidders e-11 *** --- Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Hence, the function of best fit is Price = * Age * Bidders –

Prediction — Function ‘predict’ in R predict the average price of the clock with Age=150, bidders=10: predict ( reg, data.frame ( Age=150,Bidders=10) ) predict the average price of the clock with Age=150, Bidders=10 and Age=160, Bidders=5: predict ( reg, data.frame ( Age=c(150,160), Bidders=c(10,5)) )

Exercise 1. Download data: ‘Mass and Physical Measurements for Male Subjects’ 2. Import txt file in R 3. Use ‘Mass’ as the response, ‘ Fore’, ‘Waist’, ‘Height’ and ‘Thigh’ as independent variables 4. Make scatter plot for the response and each of the independent variables 5. Fit the multiple linear regression 6. Predict ‘Mass’ with Fore= 30, Waist=180, Height=38 and Thigh=58 and with Fore=29, Waist=179, Height=39 and Thigh=57

Recall: Simple Logistic Regression Odds: Log-odds:

Recall: Simple Logistic Regression Logistic regression models the log-odds as a linear function of independent variables Not a linear function of X

Multiple Logistic Regression

Example am: transmission, 0: auto, 1: manual hp: gross horsepower wt: weight (lb/1000)

Multiple Logistic Regression — Function ‘glm’ in R logreg=glm(fomula, family=‘binomial’,data=binary) glm: generalized linear model Family: distribution of variance Data: name of the dataset In the example, reg = lm ( am ~ hp + wt, data = mtcars )

> summary(reg) Call: lm(formula = am ~ hp + wt, data = mtcars) Residuals: Min 1Q Median 3Q Max Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) e-08 *** hp * wt e-06 *** --- Signif. codes: 0 ‘***’ ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 Final Model:

For every one unit change in hp, the log odds of manual (versus auto) increases by , odds of manual (versus auto) increases by exp( )= For every one unit change in wt, the log odds of manual (versus auto) decreases by , odds of manual (versus auto) decreases by exp( )=

Exercise 1. Import data from web: 2. Fit the logistic regression of admit (as response) and gre, rank and gpa (as independent variables). What is the final logistic model? Are three independent variables significant ? glm(formula, family=‘binomial’, data=)