QEP Research Data Analysis Regression

advertisement
Statistical Software
•
•
•
•
•
•
Excel*
MegaStat
Minitab
SPSS
JMP
POM*
*We will focus on this readily available software in the demonstrations to
follow
2
When do I need a Regression Analysis?
• Regression lines are typically used when you want to
predict possible future values for variables
• Regressions can be both linear and non-linear; we will
focus on linear
• You can have an n-dimensional regression line, which
means you can have several independent variables
effecting the dependent variable
3
Simple Linear Regression
• Two variables: One independent (x) and one dependent (y)
• y=β1x+β0
• Β1 is called the slope and β0 is called the y-intercept
Let’s look at an example: Suppose you collect data on
Domestic Revenue in Freight Ton Miles for Non Scheduled
Cargo flights. This data is available on the FAA webpage:
http://apps.bts.gov/xml/air_traffic/src/datadisp.xml
You can easily download this data in an Excel Format from this
website.
4
Simple Linear Regression
Question: Is there a relationship between
month and Non-Scheduled Freight Tons in
miles? Can we make a decent prediction for
what to expect in 2014?
5
Simple Linear Regression
• Take a look at the data in the attached Excel
File under the data Tab. Be sure to ask
questions as to which data we should get
rid of, and why.
6
Simple Linear Regression
• Which data did you think to eliminate?
• Note that 9-11 had an anomaly effect, and
thus it would not be ideal to include this
data in our results. Thus we will modify the
Data and store this in the tab labeled Data
Modified.
• Be sure to report this in your research as
it highlights your analytical thinking
capabilities!!!
7
Simple Linear Regression
• Note I chose to start with November 2002
data; this is up to you. The most important
thing is to include reasoning for your choice
in your analysis write-up.
8
Simple Linear Regression
• Let’s perform the analysis using Excel’s Data
Analysis tab.
• I like to rename my data 1, 2, etc., so be
sure to note November 2002 =1.
• If you need to download Excel’s Data
Analysis package, see here:
• http://office.microsoft.com/en-us/excelhelp/load-the-analysis-toolpakHP010021569.aspx
9
Simple Linear Regression
• Note I chose to start with November 2002
data; this is up to you. The most important
thing is to include reasoning for your choice
in your analysis write-up.
10
Simple Linear Regression: Data Analysis
Step 1: Go to the data tab
Step 2: Select Regression
Step 3: Click on the square next to y-data and highlight all the
data for your dependent variable
Step 4: Do the same for the x variable. If you were running a
multiple regression with more than one x, you would highlight all
x data columns.
Step 5: Click okay (or make minor changes as you see fit for
output, alpha, etc.)
11
Simple Linear Regression-Conclusions
• So what do you findings in Excel tell you?
See Excel Sheet named Results.
• 1. The equation of the line is y=193055.94752.22x (under coefficients)
• We can see the slope is negative trending,
but does not look very strong
• This is supported by the weak R Squared
of 0.344
• Note that the data tends to be trending
up in the more recent years
12
Simple Linear Regression-Conclusions
• As an analyst, I would NOT suggest
correlating these two variables using the
data given.
• Perhaps focus on more recent data
• Look for further factors
• Reporting what not to do is just as
important as noting a success in many
cases
13
Download