Class: Dean Foster. September 30, Read sections: Examples chapter (chapter 3) Question today: Do prices go up faster than they go down?
|
|
- Shona Wells
- 5 years ago
- Views:
Transcription
1 Class: Dean Foster September 30, 2013 Administrivia Read sections: Examples chapter (chapter 3) Gas prices Question today: Do prices go up faster than they go down? Idea is that sellers watch spot price and increase directly. But, only slow competition drives the price down. So there should be an asymetry Time reversed Concept: This means the process is not time reversable But if we reverse a series: The normality stays the same the covariance structure stays the same the mean stays the same So for a linear time series, a reversed process looks identical 1
2 If you can tell which direction is which it isn t linear! reading the data I like longer names than Reuy does: > crude = read.table("chapter3/w-petroprice.txt", header = TRUE) > gas = read.table("chapter3/w-gasoline.txt") > log.gas <- log(gas[, 1]) > log.crude <- log(crude$us) > date <- as.date(paste(crude$mon, crude$day, crude$year), format = "% Note date magic! It is worth playing around with dates since they come up often in time series. Simple plots > plot(date, log.gas) log.gas
3 > plot(date, log.crude) log.crude Looking at changes > delta.gas <- diff(log.gas) > delta.crude <- diff(log.crude) And some more pictures > acf(delta.gas, lag = 20) 3
4 Series delta.gas ACF Lag > pacf(delta.gas, lag = 20) 4
5 Series delta.gas Partial ACF Lag Model selection This is what you did for homework, so I m not going to cover it in detail. See the book for details. > m1 = ar(delta.gas, method = "mle") > m1$aic > m1$order [1] 5 5
6 Regression on crude > arima(delta.gas, order = c(6, 0, 0), include.mean = F, xreg = delta. Call: arima(x = delta.gas, order = c(6, 0, 0), xreg = delta.crude, include.me Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 delta.crude s.e sigma^2 estimated as : log likelihood = , aic = my version of LAG > LAG <- function(x, lag = 1) { + n <- length(x) + return(c(rep(na, lag), x[1:(n - lag)])) + } Looking for non-linearities Nothing in the relationship with crude: > summary(lm(delta.gas ~ I(LAG(delta.gas)) + delta.crude + I(delta.cru + I(LAG(delta.crude)) + I(LAG(delta.crude)^2))) Call: lm(formula = delta.gas ~ I(LAG(delta.gas)) + delta.crude + I(delta.crud I(LAG(delta.crude)) + I(LAG(delta.crude)^2)) Residuals: Min 1Q Median 3Q Max 6
7 Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) I(LAG(delta.gas)) <2e-16 *** delta.crude <2e-16 *** I(delta.crude^2) I(LAG(delta.crude)) I(LAG(delta.crude)^2) Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: on 709 degrees of freedom (1 observation deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 5 and 709 DF, p-value: < 2.2e-16 How about in the delta.gas itself? > summary(lm(delta.gas ~ I(LAG(delta.gas)) + I(LAG(delta.gas)^2) + + I(LAG(delta.gas, 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, + 4)) + I(LAG(delta.gas, 5)) + I(LAG(delta.crude)))) Call: lm(formula = delta.gas ~ I(LAG(delta.gas)) + I(LAG(delta.gas)^2) + I(LAG(delta.gas, 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, 4)) + I(LAG(delta.gas, 5)) + I(LAG(delta.crude))) Residuals: Min 1Q Median 3Q Max Coefficients: 7
8 Estimate Std. Error t value Pr(> t ) (Intercept) *** I(LAG(delta.gas)) < 2e-16 *** I(LAG(delta.gas)^2) < 2e-16 *** I(LAG(delta.gas, 2)) I(LAG(delta.gas, 3)) ** I(LAG(delta.gas, 4)) I(LAG(delta.gas, 5)) * I(LAG(delta.crude)) Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: on 703 degrees of freedom (5 observations deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 7 and 703 DF, p-value: < 2.2e-16 > cubic <- lm(delta.gas ~ I(LAG(delta.gas)) + I(LAG(delta.gas)^2) + + I(LAG(delta.gas)^3) + I(LAG(delta.gas)^4) + I(LAG(delta.gas, + 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, 4)) + I(LAG(delta. + 5)) + I(LAG(delta.crude))) > summary(cubic) Call: lm(formula = delta.gas ~ I(LAG(delta.gas)) + I(LAG(delta.gas)^2) + I(LAG(delta.gas)^3) + I(LAG(delta.gas)^4) + I(LAG(delta.gas, 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, 4)) + I(LAG(delta.gas 5)) + I(LAG(delta.crude))) Residuals: Min 1Q Median 3Q Max
9 Coefficients: Estimate Std. Error t value Pr(> t ) (Intercept) 2.794e e *** I(LAG(delta.gas)) 6.709e e < 2e-16 *** I(LAG(delta.gas)^2) e e e-06 *** I(LAG(delta.gas)^3) e e * I(LAG(delta.gas)^4) 1.295e e I(LAG(delta.gas, 2)) 4.026e e I(LAG(delta.gas, 3)) 1.214e e ** I(LAG(delta.gas, 4)) e e I(LAG(delta.gas, 5)) e e * I(LAG(delta.crude)) e e Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > polynomial <- cbind(rep(1, length(delta.gas)), delta.gas, delta.gas^ Residual standard error: on 701 degrees of freedom (5 observations deleted due to missingness) Multiple R-squared: 0.429, Adjusted R-squared: F-statistic: on 9 and 701 DF, p-value: < 2.2e-16 > coef <- cubic$coefficients[1:5] > coef (Intercept) I(LAG(delta.gas)) I(LAG(delta.gas)^2) I(LAG(delta I(LAG(delta.gas)^4) delta.gas^3, delta.gas^4) %*% coef > plot(delta.gas, polynomial) > lines(delta.gas, delta.gas, col = "red") 9
10 delta.gas polynomial Different shocks? Our final test for an interpretable model of different shocks will consider the idea that positive shocks in crude should lead to different structure than negative shocks. > summary(lm(delta.gas ~ I(LAG(delta.gas, 1)) + I(LAG(delta.gas, + 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, 1) * (LAG(delta.cr + 0)) + I(LAG(delta.gas, 2) * (LAG(delta.crude) > 0)) + I(LAG(delt + 3) * (LAG(delta.crude) > 0)))) Call: lm(formula = delta.gas ~ I(LAG(delta.gas, 1)) + I(LAG(delta.gas, 2)) + I(LAG(delta.gas, 3)) + I(LAG(delta.gas, 1) * (LAG(delta.crude 0)) + I(LAG(delta.gas, 2) * (LAG(delta.crude) > 0)) + I(LAG(delta.g 3) * (LAG(delta.crude) > 0))) 10
11 Residuals: Min 1Q Median 3Q Max Estimate Std. Error t v Coefficients: (Intercept) I(LAG(delta.gas, 1)) I(LAG(delta.gas, 2)) I(LAG(delta.gas, 3)) I(LAG(delta.gas, 1) * (LAG(delta.crude) > 0)) I(LAG(delta.gas, 2) * (LAG(delta.crude) > 0)) I(LAG(delta.gas, 3) * (LAG(delta.crude) > 0)) Pr(> t ) (Intercept) * I(LAG(delta.gas, 1)) < 2e-16 *** I(LAG(delta.gas, 2)) I(LAG(delta.gas, 3)) * I(LAG(delta.gas, 1) * (LAG(delta.crude) > 0)) *** I(LAG(delta.gas, 2) * (LAG(delta.crude) > 0)) I(LAG(delta.gas, 3) * (LAG(delta.crude) > 0)) Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: on 706 degrees of freedom (3 observations deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 6 and 706 DF, p-value: < 2.2e-16 How about just the AR(1) term model > summary(lm(delta.gas ~ I(LAG(delta.gas, 1)) + I(LAG(delta.gas, + 1)^2) + I(LAG(delta.gas, 1)^3) + I(LAG(delta.gas, 1) * (LAG(delt 11
12 + 0)) + I(LAG(delta.gas, 1)^2 * (LAG(delta.crude) > 0)) + I(LAG(de + 1)^3 * (LAG(delta.crude) > 0)))) Call: lm(formula = delta.gas ~ I(LAG(delta.gas, 1)) + I(LAG(delta.gas, 1)^2) + I(LAG(delta.gas, 1)^3) + I(LAG(delta.gas, 1) * (LAG(delta.c 0)) + I(LAG(delta.gas, 1)^2 * (LAG(delta.crude) > 0)) + I(LAG(delta 1)^3 * (LAG(delta.crude) > 0))) Residuals: Min 1Q Median 3Q Max Estimate Std. Error t Coefficients: (Intercept) 2.792e e-04 I(LAG(delta.gas, 1)) 6.845e e-02 I(LAG(delta.gas, 1)^2) e e+00 I(LAG(delta.gas, 1)^3) e e+01 I(LAG(delta.gas, 1) * (LAG(delta.crude) > 0)) e e-01 I(LAG(delta.gas, 1)^2 * (LAG(delta.crude) > 0)) 1.900e e+00 I(LAG(delta.gas, 1)^3 * (LAG(delta.crude) > 0)) 4.362e e+01 Pr(> t ) (Intercept) *** I(LAG(delta.gas, 1)) < 2e-16 *** I(LAG(delta.gas, 1)^2) 2.68e-06 *** I(LAG(delta.gas, 1)^3) ** I(LAG(delta.gas, 1) * (LAG(delta.crude) > 0)) I(LAG(delta.gas, 1)^2 * (LAG(delta.crude) > 0)) I(LAG(delta.gas, 1)^3 * (LAG(delta.crude) > 0)) Signif. codes: 0 '***' '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 12
13 Residual standard error: on 708 degrees of freedom (1 observation deleted due to missingness) Multiple R-squared: , Adjusted R-squared: F-statistic: on 6 and 708 DF, p-value: < 2.2e-16 > summary(lm(delta.gas ~ I(LAG(delta.gas, 1)) + I(LAG(delta.gas, + 1)^2) + I(LAG(delta.gas, 1)^3)))$r.squared [1]
The log transformation produces a time series whose variance can be treated as constant over time.
TAT 520 Homework 6 Fall 2017 Note: Problem 5 is mandatory for graduate students and extra credit for undergraduates. 1) The quarterly earnings per share for 1960-1980 are in the object in the TA package.
More informationDynamic Time Series Regression: A Panacea for Spurious Correlations
International Journal of Scientific and Research Publications, Volume 6, Issue 10, October 2016 337 Dynamic Time Series Regression: A Panacea for Spurious Correlations Emmanuel Alphonsus Akpan *, Imoh
More informationHomework 2. For the homework, be sure to give full explanations where required and to turn in any relevant plots.
Homework 2 1 Data analysis problems For the homework, be sure to give full explanations where required and to turn in any relevant plots. 1. The file berkeley.dat contains average yearly temperatures for
More informationLeftovers. Morris. University Farm. University Farm. Morris. yield
Leftovers SI 544 Lada Adamic 1 Trellis graphics Trebi Wisconsin No. 38 No. 457 Glabron Peatland Velvet No. 475 Manchuria No. 462 Svansota Trebi Wisconsin No. 38 No. 457 Glabron Peatland Velvet No. 475
More informationSTAT 350: Summer Semester Midterm 1: Solutions
Name: Student Number: STAT 350: Summer Semester 2008 Midterm 1: Solutions 9 June 2008 Instructor: Richard Lockhart Instructions: This is an open book test. You may use notes, text, other books and a calculator.
More informationStat 5102 Final Exam May 14, 2015
Stat 5102 Final Exam May 14, 2015 Name Student ID The exam is closed book and closed notes. You may use three 8 1 11 2 sheets of paper with formulas, etc. You may also use the handouts on brand name distributions
More informationMultiple Linear Regression
Multiple Linear Regression ST 430/514 Recall: a regression model describes how a dependent variable (or response) Y is affected, on average, by one or more independent variables (or factors, or covariates).
More informationCoefficient of Determination
Coefficient of Determination ST 430/514 The coefficient of determination, R 2, is defined as before: R 2 = 1 SS E (yi ŷ i ) = 1 2 SS yy (yi ȳ) 2 The interpretation of R 2 is still the fraction of variance
More informationSTAT 572 Assignment 5 - Answers Due: March 2, 2007
1. The file glue.txt contains a data set with the results of an experiment on the dry sheer strength (in pounds per square inch) of birch plywood, bonded with 5 different resin glues A, B, C, D, and E.
More informationThe linear model. Our models so far are linear. Change in Y due to change in X? See plots for: o age vs. ahe o carats vs.
8 Nonlinear effects Lots of effects in economics are nonlinear Examples Deal with these in two (sort of three) ways: o Polynomials o Logarithms o Interaction terms (sort of) 1 The linear model Our models
More informationUNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Basic Exam - Applied Statistics January, 2018
UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Basic Exam - Applied Statistics January, 2018 Work all problems. 60 points needed to pass at the Masters level, 75 to pass at the PhD
More informationMath 2311 Written Homework 6 (Sections )
Math 2311 Written Homework 6 (Sections 5.4 5.6) Name: PeopleSoft ID: Instructions: Homework will NOT be accepted through email or in person. Homework must be submitted through CourseWare BEFORE the deadline.
More informationMATH 644: Regression Analysis Methods
MATH 644: Regression Analysis Methods FINAL EXAM Fall, 2012 INSTRUCTIONS TO STUDENTS: 1. This test contains SIX questions. It comprises ELEVEN printed pages. 2. Answer ALL questions for a total of 100
More informationMODELS WITHOUT AN INTERCEPT
Consider the balanced two factor design MODELS WITHOUT AN INTERCEPT Factor A 3 levels, indexed j 0, 1, 2; Factor B 5 levels, indexed l 0, 1, 2, 3, 4; n jl 4 replicate observations for each factor level
More informationMS&E 226: Small Data
MS&E 226: Small Data Lecture 15: Examples of hypothesis tests (v5) Ramesh Johari ramesh.johari@stanford.edu 1 / 32 The recipe 2 / 32 The hypothesis testing recipe In this lecture we repeatedly apply the
More informationST430 Exam 2 Solutions
ST430 Exam 2 Solutions Date: November 9, 2015 Name: Guideline: You may use one-page (front and back of a standard A4 paper) of notes. No laptop or textbook are permitted but you may use a calculator. Giving
More informationChapter 8 Conclusion
1 Chapter 8 Conclusion Three questions about test scores (score) and student-teacher ratio (str): a) After controlling for differences in economic characteristics of different districts, does the effect
More informationChapter 12: Linear regression II
Chapter 12: Linear regression II Timothy Hanson Department of Statistics, University of South Carolina Stat 205: Elementary Statistics for the Biological and Life Sciences 1 / 14 12.4 The regression model
More informationDynamic linear models (aka state-space models) 1
Dynamic linear models (aka state-space models) 1 Advanced Econometris: Time Series Hedibert Freitas Lopes INSPER 1 Part of this lecture is based on Gamerman and Lopes (2006) Markov Chain Monte Carlo: Stochastic
More informationLogistic Regressions. Stat 430
Logistic Regressions Stat 430 Final Project Final Project is, again, team based You will decide on a project - only constraint is: you are supposed to use techniques for a solution that are related to
More informationST430 Exam 1 with Answers
ST430 Exam 1 with Answers Date: October 5, 2015 Name: Guideline: You may use one-page (front and back of a standard A4 paper) of notes. No laptop or textook are permitted but you may use a calculator.
More informationClass: Taylor. January 12, Story time: Dan Willingham, the Cog Psyc. Willingham: Professor of cognitive psychology at Harvard
Class: Taylor January 12, 2011 (pdf version) Story time: Dan Willingham, the Cog Psyc Willingham: Professor of cognitive psychology at Harvard Why students don t like school We know lots about psychology
More informationExample: Data from the Child Health and Development Study
Example: Data from the Child Health and Development Study Can we use linear regression to examine how well length of gesta:onal period predicts birth weight? First look at the sca@erplot: Does a linear
More informationModels of Stationary & Non-Stationary Time Series
POLS/CSSS 503 Advanced Quantitative Political Methodology Models of Stationary & Non-Stationary Time Series Christopher Adolph University of Washington, Seattle May 19, 2011 Assistant Professor, Department
More informationcor(dataset$measurement1, dataset$measurement2, method= pearson ) cor.test(datavector1, datavector2, method= pearson )
Tutorial 7: Correlation and Regression Correlation Used to test whether two variables are linearly associated. A correlation coefficient (r) indicates the strength and direction of the association. A correlation
More informationStat 411/511 ESTIMATING THE SLOPE AND INTERCEPT. Charlotte Wickham. stat511.cwick.co.nz. Nov
Stat 411/511 ESTIMATING THE SLOPE AND INTERCEPT Nov 20 2015 Charlotte Wickham stat511.cwick.co.nz Quiz #4 This weekend, don t forget. Usual format Assumptions Display 7.5 p. 180 The ideal normal, simple
More informationLab 3 A Quick Introduction to Multiple Linear Regression Psychology The Multiple Linear Regression Model
Lab 3 A Quick Introduction to Multiple Linear Regression Psychology 310 Instructions.Work through the lab, saving the output as you go. You will be submitting your assignment as an R Markdown document.
More informationlm statistics Chris Parrish
lm statistics Chris Parrish 2017-04-01 Contents s e and R 2 1 experiment1................................................. 2 experiment2................................................. 3 experiment3.................................................
More informationLinear Model Specification in R
Linear Model Specification in R How to deal with overparameterisation? Paul Janssen 1 Luc Duchateau 2 1 Center for Statistics Hasselt University, Belgium 2 Faculty of Veterinary Medicine Ghent University,
More informationExample: 1982 State SAT Scores (First year state by state data available)
Lecture 11 Review Section 3.5 from last Monday (on board) Overview of today s example (on board) Section 3.6, Continued: Nested F tests, review on board first Section 3.4: Interaction for quantitative
More informationSTAT 3022 Spring 2007
Simple Linear Regression Example These commands reproduce what we did in class. You should enter these in R and see what they do. Start by typing > set.seed(42) to reset the random number generator so
More informationNon-independence due to Time Correlation (Chapter 14)
Non-independence due to Time Correlation (Chapter 14) When we model the mean structure with ordinary least squares, the mean structure explains the general trends in the data with respect to our dependent
More informationExamples of fitting various piecewise-continuous functions to data, using basis functions in doing the regressions.
Examples of fitting various piecewise-continuous functions to data, using basis functions in doing the regressions. David. Boore These examples in this document used R to do the regression. See also Notes_on_piecewise_continuous_regression.doc
More informationCircle the single best answer for each multiple choice question. Your choice should be made clearly.
TEST #1 STA 4853 March 6, 2017 Name: Please read the following directions. DO NOT TURN THE PAGE UNTIL INSTRUCTED TO DO SO Directions This exam is closed book and closed notes. There are 32 multiple choice
More informationR in Linguistic Analysis. Wassink 2012 University of Washington Week 6
R in Linguistic Analysis Wassink 2012 University of Washington Week 6 Overview R for phoneticians and lab phonologists Johnson 3 Reading Qs Equivalence of means (t-tests) Multiple Regression Principal
More informationWeek 9: An Introduction to Time Series
BUS41100 Applied Regression Analysis Week 9: An Introduction to Time Series Dependent data, autocorrelation, AR and periodic regression models Max H. Farrell The University of Chicago Booth School of Business
More informationBooklet of Code and Output for STAD29/STA 1007 Midterm Exam
Booklet of Code and Output for STAD29/STA 1007 Midterm Exam List of Figures in this document by page: List of Figures 1 Packages................................ 2 2 Hospital infection risk data (some).................
More informationSCHOOL OF MATHEMATICS AND STATISTICS Autumn Semester
RESTRICTED OPEN BOOK EXAMINATION (Not to be removed from the examination hall) Data provided: "Statistics Tables" by H.R. Neave PAS 371 SCHOOL OF MATHEMATICS AND STATISTICS Autumn Semester 2008 9 Linear
More informationR Output for Linear Models using functions lm(), gls() & glm()
LM 04 lm(), gls() &glm() 1 R Output for Linear Models using functions lm(), gls() & glm() Different kinds of output related to linear models can be obtained in R using function lm() {stats} in the base
More informationMatched Pair Data. Stat 557 Heike Hofmann
Matched Pair Data Stat 557 Heike Hofmann Outline Marginal Homogeneity - review Binary Response with covariates Ordinal response Symmetric Models Subject-specific vs Marginal Model conditional logistic
More informationStatistics 203 Introduction to Regression Models and ANOVA Practice Exam
Statistics 203 Introduction to Regression Models and ANOVA Practice Exam Prof. J. Taylor You may use your 4 single-sided pages of notes This exam is 7 pages long. There are 4 questions, first 3 worth 10
More informationSCHOOL OF MATHEMATICS AND STATISTICS
SHOOL OF MATHEMATIS AND STATISTIS Linear Models Autumn Semester 2015 16 2 hours Marks will be awarded for your best three answers. RESTRITED OPEN BOOK EXAMINATION andidates may bring to the examination
More informationMultiple Regression: Example
Multiple Regression: Example Cobb-Douglas Production Function The Cobb-Douglas production function for observed economic data i = 1,..., n may be expressed as where O i is output l i is labour input c
More informationCHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS
CHAPTER 21: TIME SERIES ECONOMETRICS: SOME BASIC CONCEPTS 21.1 A stochastic process is said to be weakly stationary if its mean and variance are constant over time and if the value of the covariance between
More informationAnalytics 512: Homework # 2 Tim Ahn February 9, 2016
Analytics 512: Homework # 2 Tim Ahn February 9, 2016 Chapter 3 Problem 1 (# 3) Suppose we have a data set with five predictors, X 1 = GP A, X 2 = IQ, X 3 = Gender (1 for Female and 0 for Male), X 4 = Interaction
More informationComparing Nested Models
Comparing Nested Models ST 370 Two regression models are called nested if one contains all the predictors of the other, and some additional predictors. For example, the first-order model in two independent
More informationLecture 9: Structural Breaks and Threshold Model
Lecture 9: Structural Breaks and Threshold Model 1 Structural Breaks Consider the modified AR(1) model b 0 + b 1 y t 1 + e t, (t = 1, 2,..., T b ) y t = a 0 + a 1 y t 1 + e t, (t = T b + 1, T b + 2,...,
More informationThe Classical Linear Regression Model
The Classical Linear Regression Model ME104: Linear Regression Analysis Kenneth Benoit August 14, 2012 CLRM: Basic Assumptions 1. Specification: Relationship between X and Y in the population is linear:
More informationFigure 1: The fitted line using the shipment route-number of ampules data. STAT5044: Regression and ANOVA The Solution of Homework #2 Inyoung Kim
0.0 1.0 1.5 2.0 2.5 3.0 8 10 12 14 16 18 20 22 y x Figure 1: The fitted line using the shipment route-number of ampules data STAT5044: Regression and ANOVA The Solution of Homework #2 Inyoung Kim Problem#
More informationDiagnostics and Transformations Part 2
Diagnostics and Transformations Part 2 Bivariate Linear Regression James H. Steiger Department of Psychology and Human Development Vanderbilt University Multilevel Regression Modeling, 2009 Diagnostics
More informationCherry.R. > cherry d h v <portion omitted> > # Step 1.
Cherry.R ####################################################################### library(mass) library(car) cherry < read.table(file="n:\\courses\\stat8620\\fall 08\\trees.dat",header=T) cherry d h v 1
More informationLecture 1 Intro to Spatial and Temporal Data
Lecture 1 Intro to Spatial and Temporal Data Dennis Sun Stanford University Stats 253 June 22, 2015 1 What is Spatial and Temporal Data? 2 Trend Modeling 3 Omitted Variables 4 Overview of this Class 1
More information7/28/15. Review Homework. Overview. Lecture 6: Logistic Regression Analysis
Lecture 6: Logistic Regression Analysis Christopher S. Hollenbeak, PhD Jane R. Schubart, PhD The Outcomes Research Toolbox Review Homework 2 Overview Logistic regression model conceptually Logistic regression
More informationAMS-207: Bayesian Statistics
Linear Regression How does a quantity y, vary as a function of another quantity, or vector of quantities x? We are interested in p(y θ, x) under a model in which n observations (x i, y i ) are exchangeable.
More informationStat 412/512 REVIEW OF SIMPLE LINEAR REGRESSION. Jan Charlotte Wickham. stat512.cwick.co.nz
Stat 412/512 REVIEW OF SIMPLE LINEAR REGRESSION Jan 7 2015 Charlotte Wickham stat512.cwick.co.nz Announcements TA's Katie 2pm lab Ben 5pm lab Joe noon & 1pm lab TA office hours Kidder M111 Katie Tues 2-3pm
More informationVariance Decomposition and Goodness of Fit
Variance Decomposition and Goodness of Fit 1. Example: Monthly Earnings and Years of Education In this tutorial, we will focus on an example that explores the relationship between total monthly earnings
More informationCAS MA575 Linear Models
CAS MA575 Linear Models Boston University, Fall 2013 Midterm Exam (Correction) Instructor: Cedric Ginestet Date: 22 Oct 2013. Maximal Score: 200pts. Please Note: You will only be graded on work and answers
More informationSTAT Financial Time Series
STAT 6104 - Financial Time Series Chapter 9 - Heteroskedasticity Chun Yip Yau (CUHK) STAT 6104:Financial Time Series 1 / 43 Agenda 1 Introduction 2 AutoRegressive Conditional Heteroskedastic Model (ARCH)
More informationStudy Sheet. December 10, The course PDF has been updated (6/11). Read the new one.
Study Sheet December 10, 2017 The course PDF has been updated (6/11). Read the new one. 1 Definitions to know The mode:= the class or center of the class with the highest frequency. The median : Q 2 is
More informationUNIVERSITY OF MASSACHUSETTS. Department of Mathematics and Statistics. Basic Exam - Applied Statistics. Tuesday, January 17, 2017
UNIVERSITY OF MASSACHUSETTS Department of Mathematics and Statistics Basic Exam - Applied Statistics Tuesday, January 17, 2017 Work all problems 60 points are needed to pass at the Masters Level and 75
More informationApplied Regression Analysis
Applied Regression Analysis Chapter 3 Multiple Linear Regression Hongcheng Li April, 6, 2013 Recall simple linear regression 1 Recall simple linear regression 2 Parameter Estimation 3 Interpretations of
More informationThe Big Picture. Model Modifications. Example (cont.) Bacteria Count Example
The Big Picture Remedies after Model Diagnostics The Big Picture Model Modifications Bret Larget Departments of Botany and of Statistics University of Wisconsin Madison February 6, 2007 Residual plots
More informationChaper 5: Matrix Approach to Simple Linear Regression. Matrix: A m by n matrix B is a grid of numbers with m rows and n columns. B = b 11 b m1 ...
Chaper 5: Matrix Approach to Simple Linear Regression Matrix: A m by n matrix B is a grid of numbers with m rows and n columns B = b 11 b 1n b m1 b mn Element b ik is from the ith row and kth column A
More informationLecture Notes of Bus (Spring 2017) Analysis of Financial Time Series Ruey S. Tsay
Lecture Notes of Bus 41202 (Spring 2017) Analysis of Financial Time Series Ruey S. Tsay Simple AR models: (Regression with lagged variables.) Motivating example: The growth rate of U.S. quarterly real
More informationChapter 16: Understanding Relationships Numerical Data
Chapter 16: Understanding Relationships Numerical Data These notes reflect material from our text, Statistics, Learning from Data, First Edition, by Roxy Peck, published by CENGAGE Learning, 2015. Linear
More informationLinear Regression Model. Badr Missaoui
Linear Regression Model Badr Missaoui Introduction What is this course about? It is a course on applied statistics. It comprises 2 hours lectures each week and 1 hour lab sessions/tutorials. We will focus
More informationFORECASTING USING R. Dynamic regression. Rob Hyndman Author, forecast
FORECASTING USING R Dynamic regression Rob Hyndman Author, forecast Dynamic regression Regression model with ARIMA errors y t = β 0 + β 1 x 1,t + + β r x r,t + e t y t modeled as function of r explanatory
More informationThe Problem. Regression With Correlated Errors. Generalized Least Squares. Correlated Errors. Consider the typical regression model.
The Problem Regression With Correlated Errors Consider the typical regression model y t = β z t + x t where x t is a process with covariance function γ(s, t). The matrix formulation is y = Z β + x where
More informationSTA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9)
STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline 1 Building ARIMA Models 2 SARIMA 3 Homework 4c Arthur Berg STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) 2/ 34 Outline 1 Building ARIMA Models
More informationExercise 5.4 Solution
Exercise 5.4 Solution Niels Richard Hansen University of Copenhagen May 7, 2010 1 5.4(a) > leukemia
More informationHomework1 Yang Sun 2017/9/11
Homework1 Yang Sun 2017/9/11 1. Describe data According to the data description, the response variable is AmountSpent; the predictors are, Age, Gender, OwnHome, Married, Location, Salary, Children, History,
More informationStat 401B Exam 2 Fall 2016
Stat 40B Eam Fall 06 I have neither given nor received unauthorized assistance on this eam. Name Signed Date Name Printed ATTENTION! Incorrect numerical answers unaccompanied by supporting reasoning will
More informationModel Modifications. Bret Larget. Departments of Botany and of Statistics University of Wisconsin Madison. February 6, 2007
Model Modifications Bret Larget Departments of Botany and of Statistics University of Wisconsin Madison February 6, 2007 Statistics 572 (Spring 2007) Model Modifications February 6, 2007 1 / 20 The Big
More informationLecture 18: Simple Linear Regression
Lecture 18: Simple Linear Regression BIOS 553 Department of Biostatistics University of Michigan Fall 2004 The Correlation Coefficient: r The correlation coefficient (r) is a number that measures the strength
More informationGMM - Generalized method of moments
GMM - Generalized method of moments GMM Intuition: Matching moments You want to estimate properties of a data set {x t } T t=1. You assume that x t has a constant mean and variance. x t (µ 0, σ 2 ) Consider
More informationIntroduction and Background to Multilevel Analysis
Introduction and Background to Multilevel Analysis Dr. J. Kyle Roberts Southern Methodist University Simmons School of Education and Human Development Department of Teaching and Learning Background and
More informationAnalysis of Violent Crime in Los Angeles County
Analysis of Violent Crime in Los Angeles County Xiaohong Huang UID: 004693375 March 20, 2017 Abstract Violent crime can have a negative impact to the victims and the neighborhoods. It can affect people
More informationSTA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline. Return Rate. US Gross National Product
STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) Outline 1 Building ARIMA Models 2 SARIMA 3 Homework 4c Arthur Berg STA 6857 ARIMA and SARIMA Models ( 3.8 and 3.9) 2/ 34 Return Rate Suppose x t is the value
More informationStat 4510/7510 Homework 7
Stat 4510/7510 Due: 1/10. Stat 4510/7510 Homework 7 1. Instructions: Please list your name and student number clearly. In order to receive credit for a problem, your solution must show sufficient details
More informationExercise 2 SISG Association Mapping
Exercise 2 SISG Association Mapping Load the bpdata.csv data file into your R session. LHON.txt data file into your R session. Can read the data directly from the website if your computer is connected
More informationPsychology 405: Psychometric Theory
Psychology 405: Psychometric Theory Homework Problem Set #2 Department of Psychology Northwestern University Evanston, Illinois USA April, 2017 1 / 15 Outline The problem, part 1) The Problem, Part 2)
More informationSolution to Series 6
Dr. M. Dettling Applied Series Analysis SS 2014 Solution to Series 6 1. a) > r.bel.lm summary(r.bel.lm) Call: lm(formula = NURSING ~., data = d.beluga) Residuals: Min 1Q
More informationLecture 4 Multiple linear regression
Lecture 4 Multiple linear regression BIOST 515 January 15, 2004 Outline 1 Motivation for the multiple regression model Multiple regression in matrix notation Least squares estimation of model parameters
More information1 Introduction 1. 2 The Multiple Regression Model 1
Multiple Linear Regression Contents 1 Introduction 1 2 The Multiple Regression Model 1 3 Setting Up a Multiple Regression Model 2 3.1 Introduction.............................. 2 3.2 Significance Tests
More informationPractice Final Examination
Practice Final Examination Mth 136 = Sta 114 Wednesday, 2000 April 26, 2:20 3:00 pm This is a closed-book examination so please do not refer to your notes, the text, or to any other books You may use a
More informationINTRODUCTION TO TIME SERIES ANALYSIS. The Simple Moving Average Model
INTRODUCTION TO TIME SERIES ANALYSIS The Simple Moving Average Model The Simple Moving Average Model The simple moving average (MA) model: More formally: where t is mean zero white noise (WN). Three parameters:
More information1 Forecasting House Starts
1396, Time Series, Week 5, Fall 2007 1 In this handout, we will see the application example on chapter 5. We use the same example as illustrated in the textbook and fit the data with several models of
More informationPractice 2 due today. Assignment from Berndt due Monday. If you double the number of programmers the amount of time it takes doubles. Huh?
Admistrivia Practice 2 due today. Assignment from Berndt due Monday. 1 Story: Pair programming Mythical man month If you double the number of programmers the amount of time it takes doubles. Huh? Invention
More informationTests of Linear Restrictions
Tests of Linear Restrictions 1. Linear Restricted in Regression Models In this tutorial, we consider tests on general linear restrictions on regression coefficients. In other tutorials, we examine some
More informationGeneral Linear Statistical Models - Part III
General Linear Statistical Models - Part III Statistics 135 Autumn 2005 Copyright c 2005 by Mark E. Irwin Interaction Models Lets examine two models involving Weight and Domestic in the cars93 dataset.
More informationRegression, Part I. - In correlation, it would be irrelevant if we changed the axes on our graph.
Regression, Part I I. Difference from correlation. II. Basic idea: A) Correlation describes the relationship between two variables, where neither is independent or a predictor. - In correlation, it would
More informationRegression with Polynomials and Interactions
Regression with Polynomials and Interactions Nathaniel E. Helwig Assistant Professor of Psychology and Statistics University of Minnesota (Twin Cities) Updated 04-Jan-2017 Nathaniel E. Helwig (U of Minnesota)
More informationLinear Regression is a very popular method in science and engineering. It lets you establish relationships between two or more numerical variables.
Lab 13. Linear Regression www.nmt.edu/~olegm/382labs/lab13r.pdf Note: the things you will read or type on the computer are in the Typewriter Font. All the files mentioned can be found at www.nmt.edu/~olegm/382labs/
More informationAR(p) + I(d) + MA(q) = ARIMA(p, d, q)
AR(p) + I(d) + MA(q) = ARIMA(p, d, q) Outline 1 4.1: Nonstationarity in the Mean 2 ARIMA Arthur Berg AR(p) + I(d)+ MA(q) = ARIMA(p, d, q) 2/ 19 Deterministic Trend Models Polynomial Trend Consider the
More informationBiostatistics 380 Multiple Regression 1. Multiple Regression
Biostatistics 0 Multiple Regression ORIGIN 0 Multiple Regression Multiple Regression is an extension of the technique of linear regression to describe the relationship between a single dependent (response)
More informationLinear Modelling: Simple Regression
Linear Modelling: Simple Regression 10 th of Ma 2018 R. Nicholls / D.-L. Couturier / M. Fernandes Introduction: ANOVA Used for testing hpotheses regarding differences between groups Considers the variation
More informationEconometrics 1. Lecture 8: Linear Regression (2) 黄嘉平
Econometrics 1 Lecture 8: Linear Regression (2) 黄嘉平 中国经济特区研究中 心讲师 办公室 : 文科楼 1726 E-mail: huangjp@szu.edu.cn Tel: (0755) 2695 0548 Office hour: Mon./Tue. 13:00-14:00 The linear regression model The linear
More informationInferences on Linear Combinations of Coefficients
Inferences on Linear Combinations of Coefficients Note on required packages: The following code required the package multcomp to test hypotheses on linear combinations of regression coefficients. If you
More informationGeoDa-GWR Results: GeoDa-GWR Output (portion only): Program began at 4/8/2016 4:40:38 PM
New Mexico Health Insurance Coverage, 2009-2013 Exploratory, Ordinary Least Squares, and Geographically Weighted Regression Using GeoDa-GWR, R, and QGIS Larry Spear 4/13/2016 (Draft) A dataset consisting
More informationMultiple Regression Introduction to Statistics Using R (Psychology 9041B)
Multiple Regression Introduction to Statistics Using R (Psychology 9041B) Paul Gribble Winter, 2016 1 Correlation, Regression & Multiple Regression 1.1 Bivariate correlation The Pearson product-moment
More information